-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AWS Config does not provide account alias directly. We can provide it out of band by tagging resources with the account alias which is resolved at apply time. We must piggy back on either config or configsubscription modules, since otherwise we have no resource data to extract the alias from. We don't have much choice on what to tag, since there are very few resource types across both modules. In `config`, we can only tag IAM resources. In `configsubscription`, only eventbridge rules can be tagged.
- Loading branch information
Showing
7 changed files
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
data "aws_iam_account_alias" "current" { | ||
count = var.tag_account_alias ? 1 : 0 | ||
} | ||
|
||
locals { | ||
tags = var.tag_account_alias ? { | ||
"observeinc.com/accountalias" = data.aws_iam_account_alias.current[0].account_alias | ||
} : {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
data "aws_iam_account_alias" "current" { | ||
count = var.tag_account_alias ? 1 : 0 | ||
} | ||
|
||
locals { | ||
tags = var.tag_account_alias ? { | ||
"observeinc.com/accountalias" = data.aws_iam_account_alias.current[0].account_alias | ||
} : {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters