add iam:CreateServiceLinkedRole to DeployService (#44194)

If the ECS service-linked role managed by AWS does not exist yet, then
when the OIDC integration calls ecs:CreateCluster it will fail.
Adding this permission will allow the API call to automatically
create the service-linked role on first use of ECS.
This commit is contained in:
Gavin Frazar
2024-07-16 19:57:11 +00:00
committed by GitHub
parent 70849a67f6
commit 8e7ff7efd3
2 changed files with 20 additions and 0 deletions
+3
View File
@@ -65,6 +65,9 @@ func StatementForECSManageService() *Statement {
// EC2 DescribeSecurityGroups is required so that the user can list the SG and then pick which ones they want to apply to the ECS Service.
"ec2:DescribeSecurityGroups",
// IAM CreateServiceLinkedRole is required to ensure the ECS Service linked role exists.
"iam:CreateServiceLinkedRole",
},
Resources: allResources,
}