Don't pass IAM role to ECS Service when there are more than one Target Groups @msmagoo87 (#83)
what
- In the case of registering more than one Target Group, don't create or pass the ECS service IAM role to the
aws_ecs_service
block.
why
- If you are registering multiple target groups to the service, you must allow ECS to create a service-linked role rather than passing one that was manually created. Passing one results in an API error from ECS:
Error: InvalidParameterException: You cannot specify an IAM role for services that require a service linked role.