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
b65963ed
Commit
b65963ed
authored
Feb 21, 2019
by
Kinnaird McQuade
Committed by
Anton Babenko
Feb 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added intra subnet suffix. (#220)
* Added intra subnet suffix. * Fixed duplicate intra * Fixed tag
parent
03eded61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
main.tf
main.tf
+2
-2
variables.tf
variables.tf
+5
-0
No files found.
main.tf
View file @
b65963ed
...
...
@@ -174,7 +174,7 @@ resource "aws_route_table" "intra" {
vpc_id
=
"
${
local
.
vpc_id
}
"
tags
=
"
${
merge
(
map
(
"Name"
,
"
${
var
.
name
}
-
intra
"
),
var
.
tags
,
var
.
intra_route_table_tags
)
}
"
tags
=
"
${
merge
(
map
(
"Name"
,
"
${
var
.
name
}
-
${
var
.
intra_subnet_suffix
}
"
),
var
.
tags
,
var
.
intra_route_table_tags
)
}
"
}
################
...
...
@@ -281,7 +281,7 @@ resource "aws_subnet" "intra" {
cidr_block
=
"
${
var
.
intra_subnets
[
count
.
index
]
}
"
availability_zone
=
"
${
element
(
var
.
azs
,
count
.
index
)
}
"
tags
=
"
${
merge
(
map
(
"Name"
,
format
(
"%s-
intra
-%s"
,
var
.
name
,
element
(
var
.
azs
,
count
.
index
))),
var
.
tags
,
var
.
intra_subnet_tags
)
}
"
tags
=
"
${
merge
(
map
(
"Name"
,
format
(
"%s-
${
var
.
intra_subnet_suffix
}
-%s"
,
var
.
name
,
element
(
var
.
azs
,
count
.
index
))),
var
.
tags
,
var
.
intra_subnet_tags
)
}
"
}
##############
...
...
variables.tf
View file @
b65963ed
...
...
@@ -38,6 +38,11 @@ variable "private_subnet_suffix" {
default
=
"private"
}
variable
"intra_subnet_suffix"
{
description
=
"Suffix to append to intra subnets name"
default
=
"intra"
}
variable
"database_subnet_suffix"
{
description
=
"Suffix to append to database subnets name"
default
=
"db"
...
...
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