From 92519fed99e7eee4fe28f7e47517819e66dc2635 Mon Sep 17 00:00:00 2001 From: badra001 Date: Fri, 7 Oct 2022 14:06:05 -0400 Subject: [PATCH] fix --- tag-shared-vpc-resources/main.tf | 12 ++++++++++++ tag-shared-vpc-resources/region.tf | 4 ---- 2 files changed, 12 insertions(+), 4 deletions(-) delete mode 100644 tag-shared-vpc-resources/region.tf diff --git a/tag-shared-vpc-resources/main.tf b/tag-shared-vpc-resources/main.tf index 09339b1..dae0c6d 100644 --- a/tag-shared-vpc-resources/main.tf +++ b/tag-shared-vpc-resources/main.tf @@ -32,3 +32,15 @@ * ``` */ +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)]) + + base_tags = { + "boc:tf_module_version" = local._module_version + "boc:tf_module_name" = lookup(local._module_names, local._module_name, local._module_names["_main_"]) + "boc:created_by" = "terraform" + } +} diff --git a/tag-shared-vpc-resources/region.tf b/tag-shared-vpc-resources/region.tf deleted file mode 100644 index b7b1696..0000000 --- a/tag-shared-vpc-resources/region.tf +++ /dev/null @@ -1,4 +0,0 @@ -locals { - region = var.region -} -