diff --git a/common/base_settings.tf b/common/base_settings.tf new file mode 100644 index 0000000..4e852ac --- /dev/null +++ b/common/base_settings.tf @@ -0,0 +1,6 @@ +locals { + account_id = data.aws_caller_identity.current.account_id + current_user_arn = data.aws_caller_identity.current.arn + partition = data.aws_arn.current.partition + region = data.aws_region.current.name +} diff --git a/common/base_tags.tf b/common/base_tags.tf new file mode 100644 index 0000000..602b87a --- /dev/null +++ b/common/base_tags.tf @@ -0,0 +1,6 @@ +locals { + base_tags = { + "boc:tf_module_version" = local._module_version + "boc:created_by" = "terraform" + } +} diff --git a/common/resources.tf b/common/resources.tf index 50378e5..d1410ec 100644 --- a/common/resources.tf +++ b/common/resources.tf @@ -1,10 +1,3 @@ -locals { - account_id = data.aws_caller_identity.current.account_id - current_user_arn = data.aws_caller_identity.current.arn - partition = data.aws_arn.current.partition - region = data.aws_region.current.name -} - locals { base_name = var.bucket_name name = replace(var.bucket_name, local._prefixes["s3"], "") @@ -34,10 +27,6 @@ locals { # enforced_tags = { # "boc:safeguard" = "title26" # } - base_tags = { - "boc:tf_module_version" = local._module_version - "boc:created_by" = "terraform" - } # strip spaces, convert to lowercase, make distinct, sort. Remove those not in the _defaults add_safeguard_tags = local.enable_title26 ? ["title26"] : [] _default_safeguard_tags = { for d in local._defaults["data_safeguards"] : d => d } diff --git a/kms_key/base_settings.tf b/kms_key/base_settings.tf new file mode 120000 index 0000000..396784e --- /dev/null +++ b/kms_key/base_settings.tf @@ -0,0 +1 @@ +../common/base_settings.tf \ No newline at end of file diff --git a/kms_key/base_tags.tf b/kms_key/base_tags.tf new file mode 120000 index 0000000..91c15aa --- /dev/null +++ b/kms_key/base_tags.tf @@ -0,0 +1 @@ +../common/base_tags.tf \ No newline at end of file diff --git a/standard/base_settings.tf b/standard/base_settings.tf new file mode 120000 index 0000000..396784e --- /dev/null +++ b/standard/base_settings.tf @@ -0,0 +1 @@ +../common/base_settings.tf \ No newline at end of file diff --git a/standard/base_tags.tf b/standard/base_tags.tf new file mode 120000 index 0000000..91c15aa --- /dev/null +++ b/standard/base_tags.tf @@ -0,0 +1 @@ +../common/base_tags.tf \ No newline at end of file diff --git a/title26/base_settings.tf b/title26/base_settings.tf new file mode 120000 index 0000000..396784e --- /dev/null +++ b/title26/base_settings.tf @@ -0,0 +1 @@ +../common/base_settings.tf \ No newline at end of file diff --git a/title26/base_tags.tf b/title26/base_tags.tf new file mode 120000 index 0000000..91c15aa --- /dev/null +++ b/title26/base_tags.tf @@ -0,0 +1 @@ +../common/base_tags.tf \ No newline at end of file