diff --git a/main.tf b/main.tf index 7ac49b53c..7fc4679ef 100644 --- a/main.tf +++ b/main.tf @@ -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"] }