Skip to content

Commit 62485bb

Browse files
committed
fix(alb): incorrect target group arn value and usage of non-boolean in ternary condition
1 parent 16dbc2b commit 62485bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/alb/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ resource "aws_lb_listener" "this" {
8080

8181
content {
8282
type = default_action.value.type
83-
target_group_arn = aws_lb_target_group.this[default_action.value.target_group]
83+
target_group_arn = aws_lb_target_group.this[default_action.value.target_group].arn
8484
order = default_action.value.order
8585

8686
dynamic "authenticate_cognito" {
@@ -152,7 +152,7 @@ resource "aws_lb_listener" "this" {
152152
}
153153

154154
dynamic "redirect" {
155-
for_each = length(try(default_action.value.redirect, {})) ? [1] : []
155+
for_each = length(try(default_action.value.redirect, {})) > 0 ? [1] : []
156156

157157
content {
158158
status_code = default_action.value.redirect.status_code

0 commit comments

Comments
 (0)