-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
atomic modules may help recreation of depending resources #28880
Comments
Hi @mark-00, While we already have some proposals for additional lifecycle control (most likely a feature that causes replacement on a defined change, like #16065 or #11418 or #8099), this seems like a configuration which Terraform should be able to currently handle. When you have a resource which is "registered" with another resource like this, you almost always need to use This sometimes takes cooperation with the provider itself, which may to make sure there are provisions to allow the same resource to be created before destroying, but overall works much more smoothly since you don't have to tear down all related resources to replace a single instance. Since we already have proposals for more precise control over forced replacement, I'm going to close this one out. If the provider is not able to handle using Thanks! |
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. |
Current Terraform Version
Use-cases
Terrafrom is good at creating an destroying chains of depenant resources for instance in the code below first the google_compute_region_instance_group_manager is created and then the google_compute_region_backend_service
I often run into problems when one of the dependant resources has to be recreated. In this case the google_compute_region_instance_group_manager. Google won't allow this because it is still in use by the loadbalancer. The terraform run will fail.
This is a pattern I encounterd a number of times with different resources
Attempted Solutions
Proposal
A possible solution is marking a module as atomic
When one resources in atomic module has to be recreated/destroyed all the resourcers of that module are first destroyed and than recreated in the correct order.
Maybe this can be implemented as automatic tainting of all the resources in the atomic module.
References
The text was updated successfully, but these errors were encountered: