Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow default tags to be set using a variable #491

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,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 = var.default_tags
}
}

Expand All @@ -20,9 +18,7 @@ provider "aws" {
session_name = local.aft_session_name
}
default_tags {
tags = {
managed_by = "AFT"
}
tags = var.default_tags
}
}
provider "aws" {
Expand All @@ -33,9 +29,7 @@ provider "aws" {
session_name = local.aft_session_name
}
default_tags {
tags = {
managed_by = "AFT"
}
tags = var.default_tags
}
}
provider "aws" {
Expand All @@ -46,9 +40,7 @@ provider "aws" {
session_name = local.aft_session_name
}
default_tags {
tags = {
managed_by = "AFT"
}
tags = var.default_tags
}
}
provider "aws" {
Expand All @@ -59,8 +51,6 @@ provider "aws" {
session_name = local.aft_session_name
}
default_tags {
tags = {
managed_by = "AFT"
}
tags = var.default_tags
}
}
8 changes: 8 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ variable "global_codebuild_timeout" {
}
}

variable "default_tags" {
type = map(string)
description = "Tags to apply to all supported resources"
default = {
managed_by = "AFT"
}
}

#########################################
# AFT Feature Flags
#########################################
Expand Down