codequest-eu / terraform-modules

Terraform modules commonly used in our projects
5 stars 4 forks source link

feat(ecs/task/role): ensure that the role is not used before policies are attached #136

Closed mskrajnowski closed 3 years ago

mskrajnowski commented 3 years ago

Added dependencies to ecs/task/role outputs that ensure the task is not used before the policies are attached.

mskrajnowski commented 3 years ago

Proved not enough to guarantee that provisioning aws ecs run-task commands don't fail, because ECS doesn't have access to SSM parameters for fetching secrets. Had to add a delay with a time_sleep resource.