File tree Expand file tree Collapse file tree 7 files changed +26
-4
lines changed Expand file tree Collapse file tree 7 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 11data "aws_iam_account_alias" "current" {
2- count = var. tag_account_alias ? 1 : 0
2+ count = var. tag_account_alias && var . aws_account_alias == null ? 1 : 0
33}
44
55locals {
66 tags = var. tag_account_alias ? {
7- " observeinc.com/accountalias" = data.aws_iam_account_alias.current[0 ].account_alias
7+ " observeinc.com/accountalias" = var.aws_account_alias == null ? data.aws_iam_account_alias.current[0 ].account_alias : var.aws_account_alias
88 } : {}
99}
Original file line number Diff line number Diff line change @@ -80,6 +80,15 @@ variable "sns_topic_arn" {
8080 nullable = true
8181}
8282
83+ variable "aws_account_alias" {
84+ description = <<- EOF
85+ Override AWS account alias tag.
86+ EOF
87+ type = string
88+ default = null
89+ nullable = true
90+ }
91+
8392variable "tag_account_alias" {
8493 type = bool
8594 description = <<- EOF
Original file line number Diff line number Diff line change 11data "aws_iam_account_alias" "current" {
2- count = var. tag_account_alias ? 1 : 0
2+ count = var. tag_account_alias && var . aws_account_alias == null ? 1 : 0
33}
44
55locals {
66 tags = var. tag_account_alias ? {
7- " observeinc.com/accountalias" = data.aws_iam_account_alias.current[0 ].account_alias
7+ " observeinc.com/accountalias" = var.aws_account_alias == null ? data.aws_iam_account_alias.current[0 ].account_alias : var.aws_account_alias
88 } : {}
99}
Original file line number Diff line number Diff line change @@ -14,6 +14,15 @@ variable "name_prefix" {
1414 nullable = false
1515}
1616
17+ variable "aws_account_alias" {
18+ description = <<- EOF
19+ Override AWS account alias tag.
20+ EOF
21+ type = string
22+ default = null
23+ nullable = true
24+ }
25+
1726variable "tag_account_alias" {
1827 type = bool
1928 description = <<- EOF
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ module "config" {
1111 delivery_frequency = var. config . delivery_frequency
1212 include_global_resource_types = var. config . include_global_resource_types
1313 tag_account_alias = var. config . tag_account_alias
14+ aws_account_alias = var. config . aws_account_alias
1415
1516 depends_on = [aws_s3_bucket_notification . this ]
1617}
Original file line number Diff line number Diff line change @@ -6,5 +6,6 @@ module "configsubscription" {
66 target_arn = module. forwarder . queue_arn
77
88 tag_account_alias = var. configsubscription . tag_account_alias
9+ aws_account_alias = var. configsubscription . aws_account_alias
910}
1011
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ variable "config" {
6161 delivery_frequency = optional (string )
6262 include_global_resource_types = optional (bool )
6363 tag_account_alias = optional (bool )
64+ aws_account_alias = optional (string )
6465 })
6566 default = null
6667}
@@ -72,6 +73,7 @@ variable "configsubscription" {
7273 type = object ({
7374 delivery_bucket_name = string
7475 tag_account_alias = optional (bool )
76+ aws_account_alias = optional (string )
7577 })
7678 default = null
7779}
You can’t perform that action at this time.
0 commit comments