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
743798da
Unverified
Commit
743798da
authored
May 15, 2023
by
Mike Splain
Committed by
GitHub
May 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Add dns64 routes (#924)
parent
60516929
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
README.md
README.md
+2
-0
main.tf
examples/ipv6-dualstack/main.tf
+1
-1
main.tf
main.tf
+24
-0
No files found.
README.md
View file @
743798da
...
@@ -310,9 +310,11 @@ No modules.
...
@@ -310,9 +310,11 @@ No modules.
| [aws_network_acl_rule.redshift_inbound](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_acl_rule) | resource |
| [aws_network_acl_rule.redshift_inbound](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_acl_rule) | resource |
| [aws_network_acl_rule.redshift_outbound](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_acl_rule) | resource |
| [aws_network_acl_rule.redshift_outbound](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/network_acl_rule) | resource |
| [aws_redshift_subnet_group.redshift](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/redshift_subnet_group) | resource |
| [aws_redshift_subnet_group.redshift](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/redshift_subnet_group) | resource |
| [aws_route.database_dns64_nat_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.database_internet_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.database_internet_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.database_ipv6_egress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.database_ipv6_egress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.database_nat_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.database_nat_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.private_dns64_nat_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.private_ipv6_egress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.private_ipv6_egress](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.private_nat_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.private_nat_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.public_internet_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
| [aws_route.public_internet_gateway](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route) | resource |
...
...
examples/ipv6-dualstack/main.tf
View file @
743798da
...
@@ -33,7 +33,7 @@ module "vpc" {
...
@@ -33,7 +33,7 @@ module "vpc" {
public_subnets
=
[
for
k
,
v
in
local
.
azs
:
cidrsubnet
(
local
.
vpc_cidr
,
8
,
k
+
4
)
]
public_subnets
=
[
for
k
,
v
in
local
.
azs
:
cidrsubnet
(
local
.
vpc_cidr
,
8
,
k
+
4
)
]
database_subnets
=
[
for
k
,
v
in
local
.
azs
:
cidrsubnet
(
local
.
vpc_cidr
,
8
,
k
+
8
)
]
database_subnets
=
[
for
k
,
v
in
local
.
azs
:
cidrsubnet
(
local
.
vpc_cidr
,
8
,
k
+
8
)
]
enable_nat_gateway
=
fals
e
enable_nat_gateway
=
tru
e
create_database_subnet_route_table
=
true
create_database_subnet_route_table
=
true
create_database_internet_gateway_route
=
true
create_database_internet_gateway_route
=
true
...
...
main.tf
View file @
743798da
...
@@ -436,6 +436,18 @@ resource "aws_route" "database_nat_gateway" {
...
@@ -436,6 +436,18 @@ resource "aws_route" "database_nat_gateway" {
}
}
}
}
resource
"aws_route"
"database_dns64_nat_gateway"
{
count
=
local
.
create_database_route_table
&&
!
var
.
create_database_internet_gateway_route
&&
var
.
create_database_nat_gateway_route
&&
var
.
enable_nat_gateway
&&
var
.
enable_ipv6
&&
var
.
private_subnet_enable_dns64
?
var
.
single_nat_gateway
?
1
:
local
.
len_database_subnets
:
0
route_table_id
=
element
(
aws_route_table
.
database
[
*
]
.
id
,
count
.
index
)
destination_ipv6_cidr_block
=
"64:ff9b::/96"
nat_gateway_id
=
element
(
aws_nat_gateway
.
this
[
*
]
.
id
,
count
.
index
)
timeouts
{
create
=
"5m"
}
}
resource
"aws_route"
"database_ipv6_egress"
{
resource
"aws_route"
"database_ipv6_egress"
{
count
=
local
.
create_database_route_table
&&
var
.
create_egress_only_igw
&&
var
.
enable_ipv6
&&
var
.
create_database_internet_gateway_route
?
1
:
0
count
=
local
.
create_database_route_table
&&
var
.
create_egress_only_igw
&&
var
.
enable_ipv6
&&
var
.
create_database_internet_gateway_route
?
1
:
0
...
@@ -1081,6 +1093,18 @@ resource "aws_route" "private_nat_gateway" {
...
@@ -1081,6 +1093,18 @@ resource "aws_route" "private_nat_gateway" {
}
}
}
}
resource
"aws_route"
"private_dns64_nat_gateway"
{
count
=
local
.
create_vpc
&&
var
.
enable_nat_gateway
&&
var
.
enable_ipv6
&&
var
.
private_subnet_enable_dns64
?
local
.
nat_gateway_count
:
0
route_table_id
=
element
(
aws_route_table
.
private
[
*
]
.
id
,
count
.
index
)
destination_ipv6_cidr_block
=
"64:ff9b::/96"
nat_gateway_id
=
element
(
aws_nat_gateway
.
this
[
*
]
.
id
,
count
.
index
)
timeouts
{
create
=
"5m"
}
}
################################################################################
################################################################################
# Customer Gateways
# Customer Gateways
################################################################################
################################################################################
...
...
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