From d8925771a7f602ca89c523ea1e049cc83bc025e2 Mon Sep 17 00:00:00 2001 From: badra001 Date: Fri, 21 May 2021 17:27:53 -0400 Subject: [PATCH] fix --- config/role.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/role.tf b/config/role.tf index 25a57fe..3466d23 100644 --- a/config/role.tf +++ b/config/role.tf @@ -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" { @@ -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 } #---