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
Terraform doesn't handle basic dependencies #10654
Comments
Anyone? |
This is #2445. Years old with no sign of any intent to fix. :( |
Thanks for your comment @eriksw. Really a shame the Terraform guys won't do anything about it... |
Hey @fabricetriboix 👋 Thank you for taking the time to file this issue! Given that there's been a number of Terraform and AWS provider releases since you initially filed it, can you confirm whether you're still experiencing this behavior? |
@justinretzolk I just tried again and I have exactly the same problem. Here the versions for terraform and the AWS provider:
|
I have been hearing from people that Terraform is the way to go rather than CloudFormation. Seeing how old the original issue is (2019) and where we are today (2023) I am guessing things will not magically turn around. I think I'll be going back to my CloudFormation setup 👋 |
This issue was originally opened by @fabricetriboix as hashicorp/terraform#23203. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
Terraform Configuration Files
Before:
After:
Debug Output
Crash Output
Expected Behavior
Terraform needs to replace the security group, no problem here. What Terraform should do is to detect that this security group is used by the EC2 instance and thus do something to break that dependency before trying to delete the security group, eg: detach the security group from the instance.
Actual Behavior
Terraform blindly tries to delete the security group, which can't possibly succeed because it is used by the EC2 instance.
Steps to Reproduce
Save the "before" configuration to
toy.tf
file.terraform init terraform apply vim toy.tf # Delete the `name_prefix` line and add a `name=` line terraform apply
Additional Context
References
The text was updated successfully, but these errors were encountered: