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 -} -