We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62b41b1 commit ac73063Copy full SHA for ac73063
main.tf
@@ -14,8 +14,8 @@ resource "aws_iam_role_policy_attachment" "ecs_task_execution_role_policy_attach
14
}
15
16
resource "aws_iam_policy" "ecs_task_execution_role_custom_policy" {
17
- for_each = toset(var.ecs_task_execution_role_custom_policies)
18
- name = "${var.name_prefix}-ecs-task-execution-role-custom-policy"
+ for_each = {for s in var.ecs_task_execution_role_custom_policies: index(var.ecs_task_execution_role_custom_policies, s) => s}
+ name = "${var.name_prefix}-ecs-task-execution-role-custom-policy-${each.key}"
19
description = "A custom policy for ${var.name_prefix}-ecs-task-execution-role IAM Role"
20
policy = each.value
21
tags = var.tags
0 commit comments