Commit 49df1da6 authored by Anton Babenko's avatar Anton Babenko Committed by GitHub

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
......@@ -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))))}"
}
################
......
......@@ -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 = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment