IAM role created by ecs/task/role could have been assigned to an ECS task before policies have been added to the role. This could result in some nasty race conditions, e.g. ECS failing to start a task due to missing permissions.
Added explicit depends_on to the name and arn outputs to ensure policies are assigned before the role is used.
IAM role created by
ecs/task/role
could have been assigned to an ECS task before policies have been added to the role. This could result in some nasty race conditions, e.g. ECS failing to start a task due to missing permissions.Added explicit
depends_on
to thename
andarn
outputs to ensure policies are assigned before the role is used.