AWS Auto Scaling Group, does not deleting instance

Hello, maybe someone already faced, similar issue, I’ve created an Auto Scaling Group and Launch Template for it. Problem is when I’m changing instance count for example from 2 to 1, the Instance is still running, I have to destroy it, manually and rerun the terragrunt destroy twice.

Hi,

There is always a delay between issuing a request to update the desired instance count, and the ASG reflecting the counts. So you may have been in the waiting period where the ASG hadn’t detected the updated desired instance count yet.

You can have terraform wait for the desired count to be reflected by configuring the capacity wait configurations: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group#waiting-for-capacity

Hope this helps!

Best regards,
Yori

1 Like