Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Destroy fails when protect_from_scale_in = true #288

Closed
hobti01 opened this issue Feb 28, 2019 · 3 comments
Closed

Destroy fails when protect_from_scale_in = true #288

hobti01 opened this issue Feb 28, 2019 · 3 comments

Comments

@hobti01
Copy link

hobti01 commented Feb 28, 2019

I have issues

I'm submitting a...

  • [x ] bug report
  • [x ] kudos, thank you, warm fuzzy

What is the current behavior?

  • autoscaling_enabled = true, therefore protect_from_scale_in = true
  • Make changes that cause an ASG re-creation
  • Apply
Error: Error applying plan:
...

* module.region-us-east-1.module.eks.aws_autoscaling_group.workers[0] (destroy): 1 error(s) occurred:

* aws_autoscaling_group.workers.0 (deposed #0): 1 error(s) occurred:

* aws_autoscaling_group.workers.0 (deposed #0): group still has 3 instances

If this is a bug, how to reproduce? Please include a code sample if relevant.

AWS logs indicate that there is an attempt to scale the ASG to zero before deleting - but this cannot be done because protect_from_scale_in = true.

Terraform is wedged until timeout.

What's the expected behavior?

ASG and instances are removed.

Are you able to fix this problem and submit a PR? Link here if you have already.

I can manually remove the ASG and instances, but it would be great if this case was handled. Sorry but not knowledgable enough about the module to submit a PR.

Environment details

  • Affected module version: 2.2.0
  • Terraform version: 0.11.13

Any other relevant info

Many thanks for the module and the frequent updates!

@max-rocket-internet
Copy link
Contributor

Thanks for the Kudos 💜

Please see #176

In short: You can't have protect_from_scale_in enabled and still be able to destroy the cluster with terraform.

@stefansedich
Copy link
Contributor

@max-rocket-internet we can now use asg_force_delete on the worker group and for my cases anyway it has been destroying without issue even with protect_from_scale_in.

@github-actions
Copy link

github-actions bot commented Dec 2, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants