Skip to content

Commit

Permalink
Fix ECS service custom role policies
Browse files Browse the repository at this point in the history
* The policies need to be attached to the task role, not the task
  execution role
  • Loading branch information
Stretch96 committed Jun 10, 2024
1 parent 75dd5a1 commit 8fcb99a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ecs-cluster-infrastructure-service.tf
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ resource "aws_iam_role_policy_attachment" "infrastructure_ecs_cluster_service_ta
}
]...)

role = aws_iam_role.infrastructure_ecs_cluster_service_task_execution[each.value["service_name"]].name
role = aws_iam_role.infrastructure_ecs_cluster_service_task[each.value["service_name"]].name
policy_arn = aws_iam_policy.infrastructure_ecs_cluster_service_task_custom[each.key].arn
}

Expand Down

0 comments on commit 8fcb99a

Please sign in to comment.