Skip to content

Commit

Permalink
Merge pull request #13 from felixb/nat-gateway-tags
Browse files Browse the repository at this point in the history
Add AZ to nat gateway name
  • Loading branch information
antonbabenko authored Oct 24, 2017
2 parents c5c4155 + 1da7b4e commit f906e73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ resource "aws_nat_gateway" "this" {
allocation_id = "${element(aws_eip.nat.*.id, (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", var.name)))}"
tags = "${merge(var.tags, map("Name", format("%s-%s", var.name, element(var.azs, (var.single_nat_gateway ? 0 : count.index)))))}"

depends_on = ["aws_internet_gateway.this"]
}
Expand Down

0 comments on commit f906e73

Please sign in to comment.