-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Changing label of boot disk forces replacement of instance #17044
Comments
Workaround for that:
nothing should be change at the instance |
@derhally what version of the provider are you using? Can you share the debug log that contains the api requests and responses? |
We have reproduced in both the 4.x and 5.x provider. Sorry can't share debug logs at this time. I believe this behavior has been around even in the older providers |
I believe this is similar to #6087 |
This is intended behaviour, as I'll admit that this stance is a little obtuse- |
Sorry, this is, IMHO, bad! Changing the label of a resource should never recreate it. What if you add the "application ID", "owner", "billing/cost center" information in the disk labels and they need to be changed? |
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. |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
terraform 1.3.8
provider google 5.0.0
Affected Resource(s)
Terraform Configuration Files
Debug Output
Expected Behavior
Update the labels of the boot disk in place without recreating the VM.
This is what many people expect to happen. There is no good reason why this should cause the VM to be recreated just for updating labels on the disk. This can easily be missed and lead to data loss.
To add more context. Our developers have read only access to the GCP console in certain environments, so for them to workaround this they would need to elevate their access to go and update the disk in the UI. This is a lot of work extra work and causes a disruption to the workflow.
In a medium sized terraform workspace with different types of resources that share the same label set, this small change may cause the recreation to go unnoticed. This has happened multiple times.
I don't know of any other GCP resources that need to be recreated for changing labels, so this single scenario can have catastrophic side effects.
Actual Behavior
The provider wants to recreate the VM just to update the labels of the boot disk.
Steps to Reproduce
terraform apply
terraform plan
Important Factoids
References
Terraform docs regarding
intialize_params
are hereb/321524195
The text was updated successfully, but these errors were encountered: