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
d247d8e4
Unverified
Commit
d247d8e4
authored
Jan 28, 2022
by
Loren Gordon
Committed by
GitHub
Jan 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Addresses persistent diff with manage_default_network_acl (#737)
parent
668d457a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
30 deletions
+8
-30
README.md
examples/complete-vpc/README.md
+0
-1
main.tf
examples/complete-vpc/main.tf
+1
-7
main.tf
main.tf
+7
-22
No files found.
examples/complete-vpc/README.md
View file @
d247d8e4
...
...
@@ -46,7 +46,6 @@ Note that this example may create resources which can cost money (AWS Elastic IP
|
[
aws_iam_policy_document.dynamodb_endpoint_policy
](
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document
)
| data source |
|
[
aws_iam_policy_document.generic_endpoint_policy
](
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document
)
| data source |
|
[
aws_security_group.default
](
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/security_group
)
| data source |
|
[
aws_vpc_endpoint.dynamodb
](
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/vpc_endpoint
)
| data source |
## Inputs
...
...
examples/complete-vpc/main.tf
View file @
d247d8e4
...
...
@@ -187,12 +187,6 @@ data "aws_security_group" "default" {
vpc_id
=
module
.
vpc
.
vpc_id
}
# Data source used to avoid race condition
data
"aws_vpc_endpoint"
"dynamodb"
{
vpc_id
=
module
.
vpc
.
vpc_id
service_name
=
"com.amazonaws.
${
local
.
region
}
.dynamodb"
}
data
"aws_iam_policy_document"
"dynamodb_endpoint_policy"
{
statement
{
effect
=
"Deny"
...
...
@@ -208,7 +202,7 @@ data "aws_iam_policy_document" "dynamodb_endpoint_policy" {
test
=
"StringNotEquals"
variable
=
"aws:sourceVpce"
values
=
[
data
.
vpc
.
vpc_id
]
values
=
[
module
.
vpc
.
vpc_id
]
}
}
}
...
...
main.tf
View file @
d247d8e4
...
...
@@ -587,28 +587,9 @@ resource "aws_default_network_acl" "this" {
default_network_acl_id
=
aws_vpc
.
this
[
0
]
.
default_network_acl_id
# 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
,
aws_subnet
.
outpost
[
*
]
.
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
,
aws_network_acl
.
outpost
[
*
]
.
subnet_ids
,
]
))
)
# subnet_ids is using lifecycle ignore_changes, so it is not necessary to list
# any explicitly. See https://github.com/terraform-aws-modules/terraform-aws-vpc/issues/736.
subnet_ids
=
null
dynamic
"ingress"
{
for_each
=
var
.
default_network_acl_ingress
...
...
@@ -644,6 +625,10 @@ resource "aws_default_network_acl" "this" {
var
.
tags
,
var
.
default_network_acl_tags
,
)
lifecycle
{
ignore_changes
=
[
subnet_ids
]
}
}
################################################################################
...
...
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