-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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 does not respect -replace option #35302
Comments
Hi @EugenKon, The We use GitHub issues for tracking bugs and enhancements, rather than for questions. While we can sometimes help with certain simple problems here, it's better to use the community forum where there are more people ready to help. Thanks! |
@jbardin I used to the behaviour when commands only those things which are told to them. Eg. to replace the target and dependant object I should use Without options it is expected that terraform works with whole configuration, but if "filtering" options are provided, then the scope should be limited to them. As was described here So it would be nice to have Probably this is the behaviour how it was designed, but this is not the expected behaviour and increases a learning curve. I hope this explanation will help. Regards. |
The If you are interested in a feature to more precisely limit the actions that Terraform will take, we have generally wrapped all similar |
@jbardin Thank you for the provided link. Subscribed. |
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. |
Terraform Version
terraform version Terraform v1.8.4 on darwin_amd64 + provider registry.terraform.io/hashicorp/aws v5.51.1 + provider registry.terraform.io/hashicorp/external v2.3.3 + provider registry.terraform.io/hashicorp/local v2.5.1 + provider registry.terraform.io/hashicorp/null v3.2.2 + provider registry.terraform.io/hashicorp/random v3.6.2 + provider registry.terraform.io/hashicorp/tls v4.0.5 Your version of Terraform is out of date! The latest version is 1.8.5. You can update by downloading from https://www.terraform.io/downloads.html
Terraform Configuration Files
Not relevant
Debug Output
Expected Behavior
I changed the ami for the instance. Because I have two instances based on this AMI
terraform plan
tries to update both instances and domain name for the server as expected. The instances are independed of each other. To perform my task I want to update only one "server" instance thus I used-replace
option:I expect that only one "server" instance will be replaced (and possible dependant resources).
Actual Behavior
The other instance was updated.
Steps to Reproduce
terraform apply repl
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: