Skip to content

Conversation

@raymondchen625
Copy link
Contributor

what

Set enable_ecs_service_role to false when there is no load balancer configured for the ECS service.

why

When there is no load balancer defined for the ECS service(length(var.ecs_load_balancers==0), its service role is not needed. The argument 'iam_role' should be set to null.
In the current logic, the local variable 'enable_ecs_service_role' will be set to true even there is no load balancer defined. Correcting this by changing the condition to length(var.ecs_load_balancers) == 1

references

With this bug, upgrading from <=0.25 from a config without load balancer will cause a replacement of resource aws_ecs_service.ignore_changes_task_definition, which will reset its 'task_definition' to the earliest version. There will be downtime.

@raymondchen625 raymondchen625 requested review from a team as code owners July 6, 2021 20:45
@raymondchen625
Copy link
Contributor Author

Closing it since it's a duplicate of #118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant