Skip to content

Commit

Permalink
feat: propagate caller default tags
Browse files Browse the repository at this point in the history
  • Loading branch information
kieranbrown committed Jan 4, 2024
1 parent 4b397e5 commit b9be5b0
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions providers.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
data "aws_default_tags" "current" {}

locals {
all_tags = merge(data.aws_default_tags.current.tags, {
managed_by = "AFT"
})
}

# Copyright Amazon.com, Inc. or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -6,9 +14,7 @@ provider "aws" {
region = var.ct_home_region
# The default profile or environment variables should authenticate to the Control Tower Management Account as Administrator
default_tags {
tags = {
managed_by = "AFT"
}
tags = local.all_tags
}
}

Expand All @@ -20,9 +26,7 @@ provider "aws" {
session_name = local.aft_session_name
}
default_tags {
tags = {
managed_by = "AFT"
}
tags = local.all_tags
}
}
provider "aws" {
Expand All @@ -33,9 +37,7 @@ provider "aws" {
session_name = local.aft_session_name
}
default_tags {
tags = {
managed_by = "AFT"
}
tags = local.all_tags
}
}
provider "aws" {
Expand All @@ -46,9 +48,7 @@ provider "aws" {
session_name = local.aft_session_name
}
default_tags {
tags = {
managed_by = "AFT"
}
tags = local.all_tags
}
}
provider "aws" {
Expand All @@ -59,8 +59,6 @@ provider "aws" {
session_name = local.aft_session_name
}
default_tags {
tags = {
managed_by = "AFT"
}
tags = local.all_tags
}
}

0 comments on commit b9be5b0

Please sign in to comment.