|
1 | 1 | locals { |
2 | | - target_group_arn = var.default_target_group_enabled ? join("", aws_lb_target_group.default.*.arn) : var.target_group_arn |
3 | | - authentication_oidc_scope = length(var.authentication_oidc_scope) > 0 ? join("%20", [for scope in var.authentication_oidc_scope : urlencode(scope)]) : null |
4 | | - authentication_cognito_scope = length(var.authentication_cognito_scope) > 0 ? join("%20", [for scope in var.authentication_cognito_scope : urlencode(scope)]) : null |
| 2 | + target_group_arn = var.default_target_group_enabled ? join("", aws_lb_target_group.default.*.arn) : var.target_group_arn |
5 | 3 | } |
6 | 4 |
|
7 | 5 | data "aws_lb_target_group" "default" { |
@@ -92,7 +90,7 @@ resource "aws_lb_listener_rule" "authenticated_paths_oidc" { |
92 | 90 | authorization_endpoint = var.authentication_oidc_authorization_endpoint |
93 | 91 | token_endpoint = var.authentication_oidc_token_endpoint |
94 | 92 | user_info_endpoint = var.authentication_oidc_user_info_endpoint |
95 | | - scope = local.authentication_oidc_scope |
| 93 | + scope = var.authentication_oidc_scope |
96 | 94 | } |
97 | 95 | } |
98 | 96 |
|
@@ -135,7 +133,7 @@ resource "aws_lb_listener_rule" "authenticated_paths_cognito" { |
135 | 133 | user_pool_arn = var.authentication_cognito_user_pool_arn |
136 | 134 | user_pool_client_id = var.authentication_cognito_user_pool_client_id |
137 | 135 | user_pool_domain = var.authentication_cognito_user_pool_domain |
138 | | - scope = local.authentication_cognito_scope |
| 136 | + scope = var.authentication_cognito_scope |
139 | 137 | } |
140 | 138 | } |
141 | 139 |
|
@@ -199,7 +197,7 @@ resource "aws_lb_listener_rule" "authenticated_hosts_oidc" { |
199 | 197 | authorization_endpoint = var.authentication_oidc_authorization_endpoint |
200 | 198 | token_endpoint = var.authentication_oidc_token_endpoint |
201 | 199 | user_info_endpoint = var.authentication_oidc_user_info_endpoint |
202 | | - scope = local.authentication_oidc_scope |
| 200 | + scope = var.authentication_oidc_scope |
203 | 201 | } |
204 | 202 | } |
205 | 203 |
|
@@ -228,7 +226,7 @@ resource "aws_lb_listener_rule" "authenticated_hosts_cognito" { |
228 | 226 | user_pool_arn = var.authentication_cognito_user_pool_arn |
229 | 227 | user_pool_client_id = var.authentication_cognito_user_pool_client_id |
230 | 228 | user_pool_domain = var.authentication_cognito_user_pool_domain |
231 | | - scope = local.authentication_cognito_scope |
| 229 | + scope = var.authentication_cognito_scope |
232 | 230 | } |
233 | 231 | } |
234 | 232 |
|
@@ -298,7 +296,7 @@ resource "aws_lb_listener_rule" "authenticated_hosts_paths_oidc" { |
298 | 296 | authorization_endpoint = var.authentication_oidc_authorization_endpoint |
299 | 297 | token_endpoint = var.authentication_oidc_token_endpoint |
300 | 298 | user_info_endpoint = var.authentication_oidc_user_info_endpoint |
301 | | - scope = local.authentication_oidc_scope |
| 299 | + scope = var.authentication_oidc_scope |
302 | 300 | } |
303 | 301 | } |
304 | 302 |
|
@@ -333,7 +331,7 @@ resource "aws_lb_listener_rule" "authenticated_hosts_paths_cognito" { |
333 | 331 | user_pool_arn = var.authentication_cognito_user_pool_arn |
334 | 332 | user_pool_client_id = var.authentication_cognito_user_pool_client_id |
335 | 333 | user_pool_domain = var.authentication_cognito_user_pool_domain |
336 | | - scope = local.authentication_cognito_scope |
| 334 | + scope = var.authentication_cognito_scope |
337 | 335 | } |
338 | 336 | } |
339 | 337 |
|
|
0 commit comments