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
using metadata_startup_script and changing machine_type and metadata at the same time fails #12776
using metadata_startup_script and changing machine_type and metadata at the same time fails #12776
Comments
@natedogith1 below is the error. I don't think it has anything related to the
|
I haven't modified metadata_startup_script. Changing machine_type + metadata is where I saw the issue, but I suspect anything that triggers a machine restart (anything documented as needing allow_stopping_for_update) + metadata would also trigger it. |
@natedogith1 because you chose to update the
|
That is the bug. I'm not providing metadata.startup-script, I'm only providing metadata_startup_script. |
@natedogith1 the provider re-organizes the payload. It converts |
Here's the results of the tests I did TF_LOG=DEBUG. There's probably a bunch of extra irrelevant data, since there were other terraform files in the folder that weren't changed. |
@natedogith1 do you notice below block in the payload? Basically when the instance restarts, the server side sees both were set which is against its business rule. There is not much we can do at the provider level. Does this make sense?
|
Where do you see both being set on the server side? To my knowledge, only metadata.startup-script exists in GCP, with the provider converting metadata_startup_script to metadata.startup-script. Also, I think that section is the same in both the failed restart log and the successful log where the VM was already shut down. |
@natedogith1 now I see where the problem is. The provider saves the |
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
v1.2.3 on linux_amd64
Affected Resource(s)
Terraform Configuration Files
Plan Output
Expected Behavior
Metadata and machine type are changed without issue.
Actual Behavior
Steps to Reproduce
terraform apply
terraform apply
Workaround
Change machine_type and metadata in two separate steps, or manually shut down the VM.
The text was updated successfully, but these errors were encountered: