Skip to content

Commit 1ea3d52

Browse files
alex-bakoAlex Bako
andauthored
fix: endpoint group creation (#14)
Create an endpoint group only, when the listener's endpoint group is not empty Co-authored-by: Alex Bako <[email protected]>
1 parent 30a06d3 commit 1ea3d52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ resource "aws_globalaccelerator_listener" "this" {
5353
################################################################################
5454

5555
resource "aws_globalaccelerator_endpoint_group" "this" {
56-
for_each = { for k, v in var.listeners : k => v if var.create && var.create_listeners && length(lookup(var.listeners[k], "endpoint_group", {})) >= 0 }
56+
for_each = { for k, v in var.listeners : k => v if var.create && var.create_listeners && length(lookup(var.listeners[k], "endpoint_group", {})) > 0 }
5757

5858
listener_arn = aws_globalaccelerator_listener.this[each.key].id
5959

0 commit comments

Comments
 (0)