-
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
google_compute_instance : min_cpu_platform issue when setted to "empty" #4975
google_compute_instance : min_cpu_platform issue when setted to "empty" #4975
Comments
Well that's not good. It seems like something within the API response has changed recently, because this didn't work this way in the past. I'll fix this in an upcoming release |
I think this may not be caused by a change in the API, but rather the specific machine type that you are using. Were you able to run this configuration in the past successfully? In any case, you can either specify the |
This field will default to the value set by the API if it is not specified with the release of 3.1.0 of the provider. Until then, the mitigations in my previous comment apply |
This is the first time i run this configuration so i cannot say.
Yes, this is what we are doing for the moment until the fix will be released. Thx |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Terraform Version
Terraform v0.12.16
Affected Resource(s)
Terraform Configuration Files
Debug/Info Output
https://gist.github.com/kdefives/03e51e0914deaa5c704b6445b7e351be
Expected Behavior
The second "terraform plan" should do no change at all.
Actual Behavior
When i do the plan / apply, everything is working worrectly. But when i redo a plan, even if nothing change in the terraform stack, the provider want to do a change for the min_cpu_platform even if i did not setted the min_cpu_platform into my stack.
As you can see in the result of the second "terraform plan", terraform try to do this change (see below). In my opinion, it is not normal because i did not specified the min_cpu_platform, this value is "computed" by GCP during the resource creation...
Steps to Reproduce
By using my code above (by replacing secret to declare the provider)
terraform apply
terraform plan
Workaround
Currently i will force the min_cpu_platform parameter to avoid this issue. But from my point of view it is not a good way to do (even more in production...), because it means that i have to provision the resource first whitout the parameter in order to know which cpu_platform GCP will choose. Then, i have to update my stack by adding the value used by GCP and redo a plan/apply to be "clean".
I discover this problem by using Terraform v0.11.14 with provider.google v2.20.0 because we cannot use Terraform v0.12 in production.
Thanks in advance for your help.
Let me know if you need more informations.
Regards
The text was updated successfully, but these errors were encountered: