File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -28,9 +28,11 @@ module "vpc" {
28
28
local. network_acls [" elasticache_outbound" ],
29
29
)
30
30
31
- private_dedicated_network_acl = true
31
+ private_dedicated_network_acl = false
32
32
elasticache_dedicated_network_acl = true
33
33
34
+ manage_default_network_acl = true
35
+
34
36
enable_ipv6 = true
35
37
36
38
enable_nat_gateway = false
@@ -200,4 +202,3 @@ locals {
200
202
]
201
203
}
202
204
}
203
-
Original file line number Diff line number Diff line change @@ -534,6 +534,27 @@ resource "aws_default_network_acl" "this" {
534
534
535
535
default_network_acl_id = element (concat (aws_vpc. this . * . default_network_acl_id , [" " ]), 0 )
536
536
537
+ # The value of subnet_ids should be any subnet IDs that are not set as subnet_ids
538
+ # for any of the non-default network ACLs
539
+ subnet_ids = setsubtract (
540
+ compact (flatten ([
541
+ aws_subnet . public . * . id ,
542
+ aws_subnet . private . * . id ,
543
+ aws_subnet . intra . * . id ,
544
+ aws_subnet . database . * . id ,
545
+ aws_subnet . redshift . * . id ,
546
+ aws_subnet . elasticache . * . id ,
547
+ ])),
548
+ compact (flatten ([
549
+ aws_network_acl . public . * . subnet_ids ,
550
+ aws_network_acl . private . * . subnet_ids ,
551
+ aws_network_acl . intra . * . subnet_ids ,
552
+ aws_network_acl . database . * . subnet_ids ,
553
+ aws_network_acl . redshift . * . subnet_ids ,
554
+ aws_network_acl . elasticache . * . subnet_ids ,
555
+ ]))
556
+ )
557
+
537
558
dynamic "ingress" {
538
559
for_each = var. default_network_acl_ingress
539
560
content {
You can’t perform that action at this time.
0 commit comments