Skip to content

Commit

Permalink
Set correct TG for listeners (fixed #119) (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
aidan-melen authored and antonbabenko committed Nov 20, 2019
1 parent 258d9ad commit 016cffc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions alb_no_logs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ resource "aws_lb_listener" "frontend_http_tcp_no_logs" {
count = var.create_alb && false == var.logging_enabled ? var.http_tcp_listeners_count : 0

default_action {
target_group_arn = aws_lb_target_group.main_no_logs[lookup(var.http_tcp_listeners[count.index], "target_group_index", 0)].id
target_group_arn = aws_lb_target_group.main_no_logs[lookup(var.http_tcp_listeners[count.index], "target_group_index", count.index)].id
type = "forward"
}
}
Expand All @@ -145,7 +145,7 @@ resource "aws_lb_listener" "frontend_https_no_logs" {
count = var.create_alb && false == var.logging_enabled ? var.https_listeners_count : 0

default_action {
target_group_arn = aws_lb_target_group.main_no_logs[lookup(var.https_listeners[count.index], "target_group_index", 0)].id
target_group_arn = aws_lb_target_group.main_no_logs[lookup(var.https_listeners[count.index], "target_group_index", count.index)].id
type = "forward"
}
}
Expand Down
4 changes: 2 additions & 2 deletions alb_w_logs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ resource "aws_lb_listener" "frontend_http_tcp" {
count = var.create_alb && var.logging_enabled ? var.http_tcp_listeners_count : 0

default_action {
target_group_arn = aws_lb_target_group.main[lookup(var.http_tcp_listeners[count.index], "target_group_index", 0)].id
target_group_arn = aws_lb_target_group.main[lookup(var.http_tcp_listeners[count.index], "target_group_index", count.index)].id
type = "forward"
}
}
Expand All @@ -156,7 +156,7 @@ resource "aws_lb_listener" "frontend_https" {
count = var.create_alb && var.logging_enabled ? var.https_listeners_count : 0

default_action {
target_group_arn = aws_lb_target_group.main[lookup(var.https_listeners[count.index], "target_group_index", 0)].id
target_group_arn = aws_lb_target_group.main[lookup(var.https_listeners[count.index], "target_group_index", count.index)].id
type = "forward"
}
}
Expand Down

0 comments on commit 016cffc

Please sign in to comment.