From 16a1e5a1892f322208b52b7bae828955ea61c8d6 Mon Sep 17 00:00:00 2001 From: badra001 Date: Tue, 26 Aug 2025 10:34:24 -0400 Subject: [PATCH] fix --- custom/custom.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom/custom.tf b/custom/custom.tf index 1eed1d4..c1c2d7e 100644 --- a/custom/custom.tf +++ b/custom/custom.tf @@ -123,7 +123,7 @@ resource "aws_security_group" "this_security_group" { # inress with prefix lists dynamic "ingress" { - for_each = length(var.ingress_prefix_list_names) && length(var.ingress_prefix_list_ports) > 0 ? toset(var.ingress_prefix_list_ports) : toset([]) + for_each = length(var.ingress_prefix_list_names) > 0 && length(var.ingress_prefix_list_ports) > 0 ? toset(var.ingress_prefix_list_ports) : toset([]) iterator = p content { description = try(p.value.label, local.short_description) @@ -162,7 +162,7 @@ resource "aws_security_group" "this_security_group" { # egress with prefix lists dynamic "egress" { - for_each = length(var.egress_prefix_list_names) && length(var.egress_prefix_list_ports) > 0 ? toset(var.egress_prefix_list_ports) : toset([]) + for_each = length(var.egress_prefix_list_names) > 0 && length(var.egress_prefix_list_ports) > 0 ? toset(var.egress_prefix_list_ports) : toset([]) iterator = p content { description = try(p.value.label, local.short_description)