File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -13,4 +13,9 @@ locals {
1313 organization_id = data. aws_organizations_organization . this . id
1414
1515 home_region = var. home_region
16+
17+ config_recorder_role_policies = [
18+ " arn:aws:iam::aws:policy/service-role/AWS_ConfigRole" ,
19+ " arn:aws:iam::aws:policy/ReadOnlyAccess"
20+ ]
1621}
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ resource "aws_iam_role" "mgmt_config_recorder_role" {
2121 tags = local. tags
2222}
2323
24+ resource "aws_iam_role_policy_attachment" "mgmt_config_recorder_policy_attachments" {
25+ for_each = toset (local. config_recorder_role_policies )
26+ role = aws_iam_role. mgmt_config_recorder_role . name
27+ policy_arn = each. value
28+ }
29+
2430# this AWS resources has no tags attribute
2531resource "aws_config_configuration_recorder" "mgmt_config_recorder" {
2632
You can’t perform that action at this time.
0 commit comments