Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
terraform-aws-vpc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Terraform Modules
terraform-aws-vpc
Commits
8634bcda
Unverified
Commit
8634bcda
authored
Oct 21, 2020
by
Jeremy Ciak
Committed by
GitHub
Oct 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Resource aws_default_network_acl orphaned subnet_ids (#530)
parent
2179d203
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
main.tf
examples/network-acls/main.tf
+3
-2
main.tf
main.tf
+21
-0
No files found.
examples/network-acls/main.tf
View file @
8634bcda
...
...
@@ -28,9 +28,11 @@ module "vpc" {
local
.
network_acls
[
"elasticache_outbound"
]
,
)
private_dedicated_network_acl
=
tru
e
private_dedicated_network_acl
=
fals
e
elasticache_dedicated_network_acl
=
true
manage_default_network_acl
=
true
enable_ipv6
=
true
enable_nat_gateway
=
false
...
...
@@ -200,4 +202,3 @@ locals {
]
}
}
main.tf
View file @
8634bcda
...
...
@@ -534,6 +534,27 @@ resource "aws_default_network_acl" "this" {
default_network_acl_id
=
element
(
concat
(
aws_vpc
.
this
.*.
default_network_acl_id
,
[
""
]
),
0
)
# The value of subnet_ids should be any subnet IDs that are not set as subnet_ids
# for any of the non-default network ACLs
subnet_ids
=
setsubtract
(
compact
(
flatten
(
[
aws_subnet
.
public
.*.
id
,
aws_subnet
.
private
.*.
id
,
aws_subnet
.
intra
.*.
id
,
aws_subnet
.
database
.*.
id
,
aws_subnet
.
redshift
.*.
id
,
aws_subnet
.
elasticache
.*.
id
,
]
)),
compact
(
flatten
(
[
aws_network_acl
.
public
.*.
subnet_ids
,
aws_network_acl
.
private
.*.
subnet_ids
,
aws_network_acl
.
intra
.*.
subnet_ids
,
aws_network_acl
.
database
.*.
subnet_ids
,
aws_network_acl
.
redshift
.*.
subnet_ids
,
aws_network_acl
.
elasticache
.*.
subnet_ids
,
]
))
)
dynamic
"ingress"
{
for_each
=
var
.
default_network_acl_ingress
content
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment