Commit a45c8add authored by David Harris's avatar David Harris Committed by Anton Babenko

Add `nat_gateway_tags` input (#141)

parent 0a56c648
......@@ -199,6 +199,7 @@ Terraform version 0.10.3 or newer is required for this module to work.
| map_public_ip_on_launch | Should be false if you do not want to auto-assign public IP on launch | string | `true` | no |
| name | Name to be used on all the resources as identifier | string | `` | no |
| one_nat_gateway_per_az | Should be true if you want only one NAT Gateway per availability zone. Requires `var.azs` to be set, and the number of `public_subnets` created to be greater than or equal to the number of availability zones specified in `var.azs`. | string | `false` | no |
| nat_gateway_tags | Additional tags for the nat gateways | string | `<map>` | no |
| private_route_table_tags | Additional tags for the private route tables | string | `<map>` | no |
| private_subnet_tags | Additional tags for the private subnets | string | `<map>` | no |
| private_subnets | A list of private subnets inside the VPC | string | `<list>` | no |
......
......@@ -245,7 +245,7 @@ resource "aws_nat_gateway" "this" {
allocation_id = "${element(local.nat_gateway_ips, (var.single_nat_gateway ? 0 : count.index))}"
subnet_id = "${element(aws_subnet.public.*.id, (var.single_nat_gateway ? 0 : count.index))}"
tags = "${merge(var.tags, map("Name", format("%s-%s", var.name, element(var.azs, (var.single_nat_gateway ? 0 : count.index)))))}"
tags = "${merge(var.tags, var.nat_gateway_tags, map("Name", format("%s-%s", var.name, element(var.azs, (var.single_nat_gateway ? 0 : count.index)))))}"
depends_on = ["aws_internet_gateway.this"]
}
......
......@@ -198,6 +198,11 @@ variable "dhcp_options_tags" {
default = {}
}
variable "nat_gateway_tags" {
description = "Additional tags for the nat gateways"
default = {}
}
variable "enable_dhcp_options" {
description = "Should be true if you want to specify a DHCP options set with a custom domain name, DNS servers, NTP servers, netbios servers, and/or netbios server type"
default = false
......
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