From e4d6df2aa4bab0d840bbab71276cca3bc69f9113 Mon Sep 17 00:00:00 2001 From: Dmytro Prokhorenkov Date: Mon, 27 Feb 2023 20:22:34 +0100 Subject: [PATCH] feat: Added tags per VPC attachment (#103) Co-authored-by: Anton Babenko --- examples/complete/main.tf | 3 +++ main.tf | 1 + 2 files changed, 4 insertions(+) diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 5e2eb65..57d6c99 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -65,6 +65,9 @@ module "tgw" { destination_cidr_block = "10.10.10.10/32" } ] + tags = { + Name = "${local.name}-vpc2" + } }, } diff --git a/main.tf b/main.tf index 600e26e..411c6b3 100644 --- a/main.tf +++ b/main.tf @@ -79,6 +79,7 @@ resource "aws_ec2_transit_gateway_vpc_attachment" "this" { var.tags, { Name = var.name }, var.tgw_vpc_attachment_tags, + try(each.value.tags, {}), ) }