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
bda5f759
Unverified
Commit
bda5f759
authored
Oct 06, 2020
by
Anton Babenko
Committed by
GitHub
Oct 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert: Create only required number of NAT gateways (#492) (#517)
parent
310ab7e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
main.tf
examples/simple-vpc/main.tf
+6
-7
main.tf
main.tf
+1
-1
No files found.
examples/simple-vpc/main.tf
View file @
bda5f759
...
@@ -9,15 +9,14 @@ module "vpc" {
...
@@ -9,15 +9,14 @@ module "vpc" {
cidr
=
"10.0.0.0/16"
cidr
=
"10.0.0.0/16"
azs
=
[
"eu-west-1a"
,
"eu-west-1b"
,
"euw1-az3"
]
azs
=
[
"eu-west-1a"
,
"eu-west-1b"
,
"euw1-az3"
]
private_subnets
=
[
"10.0.1.0/24"
,
"10.0.2.0/24"
]
private_subnets
=
[
"10.0.1.0/24"
,
"10.0.2.0/24"
,
"10.0.3.0/24"
]
database_subnets
=
[
"10.0.5.0/24"
]
public_subnets
=
[
"10.0.101.0/24"
,
"10.0.102.0/24"
,
"10.0.103.0/24"
]
public_subnets
=
[
"10.0.101.0/24"
,
"10.0.102.0/24"
,
"10.0.103.0/24"
,
"10.0.104.0/24"
]
enable_nat_gateway
=
true
enable_ipv6
=
true
# single_nat_gateway = true
create_database_subnet_group
=
false
enable_nat_gateway
=
true
single_nat_gateway
=
true
public_subnet_tags
=
{
public_subnet_tags
=
{
Name
=
"overridden-name-public"
Name
=
"overridden-name-public"
...
...
main.tf
View file @
bda5f759
...
@@ -5,7 +5,7 @@ locals {
...
@@ -5,7 +5,7 @@ locals {
length
(
var
.
database_subnets
),
length
(
var
.
database_subnets
),
length
(
var
.
redshift_subnets
),
length
(
var
.
redshift_subnets
),
)
)
nat_gateway_count
=
var
.
single_nat_gateway
?
1
:
var
.
one_nat_gateway_per_az
?
length
(
var
.
azs
)
:
local
.
max_subnet_length
<
length
(
var
.
public_subnets
)
?
local
.
max_subnet_length
:
length
(
var
.
public_subnets
)
nat_gateway_count
=
var
.
single_nat_gateway
?
1
:
var
.
one_nat_gateway_per_az
?
length
(
var
.
azs
)
:
local
.
max_subnet_length
# Use `local.vpc_id` to give a hint to Terraform that subnets should be deleted before secondary CIDR blocks can be free!
# Use `local.vpc_id` to give a hint to Terraform that subnets should be deleted before secondary CIDR blocks can be free!
vpc_id
=
element
(
vpc_id
=
element
(
...
...
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