Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
badra001 committed May 21, 2021
1 parent a97d218 commit d892577
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions config/role.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
locals {
config_policies = [
data.aws_iam_policy.aws_config_role.arn,
aws_iam_policy.config.arn,
]
config_policies = {
"aws-config-role" = data.aws_iam_policy.aws_config_role.arn,
"p-inf-config" = aws_iam_policy.config.arn,
}
}

data "aws_iam_policy" "aws_config_role" {
Expand Down Expand Up @@ -55,9 +55,9 @@ resource "aws_iam_policy" "config" {
}

resource "aws_iam_role_policy_attachment" "config" {
for_each = toset(local.config_policies)
for_each = local.config_policies
role = aws_iam_role.config.name
policy_arn = each.key
policy_arn = each.value
}

#---
Expand Down

0 comments on commit d892577

Please sign in to comment.