From 61eeadadac98db10d2ce25ba2e7c6817d12d27fe Mon Sep 17 00:00:00 2001 From: Michal Schott Date: Fri, 20 Oct 2017 15:07:16 +0200 Subject: [PATCH] NAT gateway should be tagged too. --- main.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.tf b/main.tf index f47d27430..7ac49b53c 100644 --- a/main.tf +++ b/main.tf @@ -139,6 +139,8 @@ 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)))}" + depends_on = ["aws_internet_gateway.this"] }