DNXLabs / terraform-aws-ecs

This terraform module builds an Elastic Container Service(ECS) Cluster in AWS.
https://modules.dnx.one/
Apache License 2.0
29 stars 31 forks source link

Include option to create or not iam service linked role #25

Closed brunodasilvalenga closed 3 years ago

brunodasilvalenga commented 3 years ago

There is no way to determine in Terraform whether the role linked to the service has already been created in the AWS account. So, you must manually check and, if it not exists, set create_iam_service_linked_role to true, otherwise, set it to false or leave as default. We haven't found a better way to do this.

brunodasilvalenga commented 3 years ago

The fix is to avoid this type of error:

Error: error creating capacity provider: ClientException: ECS Service Linked Role does not exist. Please create a Service linked role for ECS and try again.