diff --git a/vpc-transit-gateway-association/peer/main.tf b/vpc-transit-gateway-association/peer/main.tf index 7fddf2a..bca7ec9 100644 --- a/vpc-transit-gateway-association/peer/main.tf +++ b/vpc-transit-gateway-association/peer/main.tf @@ -44,10 +44,11 @@ */ locals { - account_id = var.account_id != "" ? var.account_id : data.aws_caller_identity.current.account_id - account_environment = data.aws_arn.current.partition == "aws-us-gov" ? "gov" : "ew" - region = data.aws_region.current.name - region_short = join("", [for c in split("-", local.region) : substr(c, 0, 1)]) + account_id = var.account_id != "" ? var.account_id : data.aws_caller_identity.current.account_id + account_environment = data.aws_arn.current.partition == "aws-us-gov" ? "gov" : "ew" + region = data.aws_region.current.name + region_short = join("", [for c in split("-", local.region) : substr(c, 0, 1)]) + self_is_network_account = data.aws_caller_identity.current.account_id == data.aws_caller_identity.network_account.account_id base_tags = { "boc:tf_module_version" = local._module_version diff --git a/vpc-transit-gateway-association/self/associate.tf b/vpc-transit-gateway-association/self/associate.tf index 9c0fcc8..b8e7622 100644 --- a/vpc-transit-gateway-association/self/associate.tf +++ b/vpc-transit-gateway-association/self/associate.tf @@ -1,7 +1,8 @@ locals { attachment_tags = { Name = format("%v:%v", data.aws_iam_account_alias.current.account_alias, var.vpc_full_name) - "boc:tgw_environment" = var.transit_gateway_environment + "boc:tgw:environment" = var.transit_gateway_environment + "boc:tgw:label" = var.tgw_label } } diff --git a/vpc-transit-gateway-association/self/routing.tf b/vpc-transit-gateway-association/self/routing.tf index 45ddc2f..a71a7d8 100644 --- a/vpc-transit-gateway-association/self/routing.tf +++ b/vpc-transit-gateway-association/self/routing.tf @@ -20,6 +20,10 @@ module "routing_attachment_ipv4" { tags = merge( local.base_tags, var.tags, + { + "boc:tgw:environment" = var.transit_gateway_environment + "boc:tgw:label" = var.tgw_label + } ) }