diff --git a/firewall-production.tf b/firewall-production.tf index bd0bb04..c9f0f91 100644 --- a/firewall-production.tf +++ b/firewall-production.tf @@ -94,10 +94,10 @@ resource "aws_networkfirewall_firewall" "default_firewall" { vpc_id = aws_vpc.default.id subnet_mapping { count = length(var.public_subnets_cidr) - subnet_id = element(var.public_subnets_cidr, count.index) + subnet_id = element(aws_subnet.public_subnet.*.id, count.index) } subnet_mapping { count = length(var.private_subnets_cidr) - subnet_id = element(var.private_subnets_cidr, count.index) + subnet_id = element(aws_subnet.private_subnet.*.id, count.index) } } \ No newline at end of file