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
49df1da6
Commit
49df1da6
authored
Sep 26, 2017
by
Anton Babenko
Committed by
GitHub
Sep 26, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3 from gas-buddy/gasbuddy/eherot/custom_route_tags
Allow the user to define custom tags for route tables
parents
c3396b0a
c3b35b6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
main.tf
main.tf
+2
-2
variables.tf
variables.tf
+10
-0
No files found.
main.tf
View file @
49df1da6
...
...
@@ -30,7 +30,7 @@ resource "aws_route_table" "public" {
vpc_id
=
"
${
aws_vpc
.
this
.
id
}
"
propagating_vgws
=
[
"
${
var
.
public_propagating_vgws
}
"
]
tags
=
"
${
merge
(
var
.
tags
,
map
(
"Name"
,
format
(
"%s-public"
,
var
.
name
)))
}
"
tags
=
"
${
merge
(
var
.
tags
,
var
.
public_route_table_tags
,
map
(
"Name"
,
format
(
"%s-public"
,
var
.
name
)))
}
"
}
resource
"aws_route"
"public_internet_gateway"
{
...
...
@@ -50,7 +50,7 @@ resource "aws_route_table" "private" {
vpc_id
=
"
${
aws_vpc
.
this
.
id
}
"
propagating_vgws
=
[
"
${
var
.
private_propagating_vgws
}
"
]
tags
=
"
${
merge
(
var
.
tags
,
map
(
"Name"
,
format
(
"%s-private-%s"
,
var
.
name
,
element
(
var
.
azs
,
count
.
index
))))
}
"
tags
=
"
${
merge
(
var
.
tags
,
var
.
private_route_table_tags
,
map
(
"Name"
,
format
(
"%s-private-%s"
,
var
.
name
,
element
(
var
.
azs
,
count
.
index
))))
}
"
}
################
...
...
variables.tf
View file @
49df1da6
...
...
@@ -105,6 +105,16 @@ variable "private_subnet_tags" {
default
=
{}
}
variable
"public_route_table_tags"
{
description
=
"Additional tags for the public route tables"
default
=
{}
}
variable
"private_route_table_tags"
{
description
=
"Additional tags for the private route tables"
default
=
{}
}
variable
"database_subnet_tags"
{
description
=
"Additional tags for the database subnets"
default
=
{}
...
...
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