diff --git a/common/common.tf b/common/common.tf index f225c95..238c469 100644 --- a/common/common.tf +++ b/common/common.tf @@ -1,7 +1,7 @@ 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 = var.region + region = data.aws_region.current.name base_tags = { "boc:tf_module_version" = local._module_version @@ -11,7 +11,7 @@ locals { locals { name_parts = split(".", var.name) - host_name = var.name_parts[0] + host_name = local.name_parts[0] zone = trimprefix(var.name, format("%v.", local.host_name)) private_zone = local.account_environment == "gov" ? true : var.private_zone rr_type = upper(local.record_type) @@ -19,5 +19,5 @@ locals { default_heritage_prefix = lookup(local._defaults.heritage_prefix, local.record_type, "") != "" ? format("%v.", lookup(local._defaults.heritage_prefix, local.record_type)) : "" values = type(var.values) == "string" ? [var.values] : var.values } - + resource "time_static" "timestamp" {}