-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix: ENI's prevent SecGrps from being destroyed on tf destroy #311
Fix: ENI's prevent SecGrps from being destroyed on tf destroy #311
Conversation
Thanks! I was looking for this too. Just did the same thing w/o the variable in a branch of my own. |
Can we think of any reason or situation where this should NOT default to true? Maybe like accidental destroy or something like that? |
The interfaces get orphaned once the ASG's get deleted by the destroy, this wont prevent an accidental destroy, but it will allow it to be a clean one. |
I was actually wondering if it is even necessary to have the The question is really in which cases would someone purposely want to leave ENI dangling for the EKS cluster. The case I know and use outside of EKS is to be able to replace an instance of a service but keeping the same IP than the previous instance it is replacing. I don't think this is really necessary for EKS nodes. The default to true is the sensible choice otherwise. |
Is this definitely desired? So we can have a clean destroy when people don't bother scaling ASG to 0 before running destroy, but we end up with leftover ENIs? |
@max-rocket-internet I am definitely confused now. My PoV is it's definitely not desired. I was commenting about this because I don't think anyone would want to set I am regularly creating and destroying EKS clusters w/o scaling down the ASG to 0 because I don't bother for a test environment. The problem this solves is not only the dangling ENIs but the fact the cluster won't be destroyed if we attach external SG to it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK cool! Looks like everyone wants this so let's do it.
Hi, experiencing similar things at version 11.0.0. I have an additional security group added : resource "aws_security_group" "additional_cluster_sg" { When i added the lifecycle {} part into my security groups, i did 20 destroy, only 1 fails. |
I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Fix: ENI's prevent SecGrps from being destroyed on tf destroy
Description
terraform destroy
fails on security group deletion due to the SG's being attached to ENI'sSetting destroy on term allows for the cluster to be fully cleaned up.
Checklist
terraform fmt
andterraform validate
both work from the root andexamples/eks_test_fixture
directories (look in CI for an example)