terraform-provider-aws
terraform-provider-aws copied to clipboard
aws_ecs_service inconsistent delete timeout handling
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Description
New or Affected Resource(s)
- aws_ecs_service
aws_ecs_service.main: Still destroying... [id=arn:aws:ecs:us-east-1:abc123:serv...ng/my-service, 10m0s elapsed]
Error: timeout while waiting for state to become 'INACTIVE' (last state: 'DRAINING', timeout: 10m0s)
The currrent implementation tries to delete for a given timeout
but then waits for a fixed amount of time. This leads to failures for services that have high load balancer drain delays set
https://github.com/hashicorp/terraform-provider-aws/blob/main/aws/resource_aws_ecs_service.go#L1119
https://github.com/hashicorp/terraform-provider-aws/blob/main/aws/resource_aws_ecs_service.go#L1141
wonding if there a workaround for this or if this will get some attention.
Put this parameter <force_delete = true> in the resource aws_autoscaling_group. It's worked for me.
Put this parameter <force_delete = true> in the resource aws_autoscaling_group. It's worked for me.
@ZdeAttre, I'm curious why it would work. In my setup, Terraform doesn't attempt to delete the ASG; it just stumbles on deleting the service. Interestingly, the web UI doesn't show the service.