From 1b6326ab8d79cc006e823c48f4c2fb5e7afc2ede Mon Sep 17 00:00:00 2001 From: Ryan Goh <1871494+ryanoolala@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:02:47 +0800 Subject: [PATCH] fix: database nacl count using local.create_intranet --- nacl.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nacl.tf b/nacl.tf index bc2b7bc..7ea3dea 100644 --- a/nacl.tf +++ b/nacl.tf @@ -1103,7 +1103,7 @@ resource "aws_network_acl_rule" "database_outbound_allow_all_ephemeral_rule" { } resource "aws_network_acl_rule" "database_inbound_allow_all_ephemeral_rule_secondary_cidr" { - count = local.create_intranet ? length(var.secondary_cidr_blocks) : 0 + count = local.create_database ? length(var.secondary_cidr_blocks) : 0 network_acl_id = aws_network_acl.database[0].id rule_number = 1010 + count.index cidr_block = var.secondary_cidr_blocks[count.index] @@ -1114,7 +1114,7 @@ resource "aws_network_acl_rule" "database_inbound_allow_all_ephemeral_rule_secon } resource "aws_network_acl_rule" "database_outbound_allow_all_ephemeral_rule_secondary_cidr" { - count = local.create_intranet ? length(var.secondary_cidr_blocks) : 0 + count = local.create_database ? length(var.secondary_cidr_blocks) : 0 network_acl_id = aws_network_acl.database[0].id rule_number = 1010 + count.index cidr_block = var.secondary_cidr_blocks[count.index] @@ -1123,4 +1123,4 @@ resource "aws_network_acl_rule" "database_outbound_allow_all_ephemeral_rule_seco to_port = 65535 rule_action = "allow" egress = true -} \ No newline at end of file +}