-
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
Can not change google_compute_instance machine_type when min_cpu_platform is set #15471
Can not change google_compute_instance machine_type when min_cpu_platform is set #15471
Comments
Interesting. Below is what I got. The api returns 200 but with error message. Should this be treated as successful or failure? @zli82016
|
Hi @edwardmedia That seems to be different to what I'm seeing, not sure why there would be a message about an ELB |
I got an error googleapi: Error 400: The selected machine type (n2d-standard-2) has a required CPU platform of rome. The minimum CPU platform must match this, but was icelake., badRequest |
The provider works as intended. It’s the API that causes the extra step when changing This was delegated to the Compute API team along with problems printing the correct platform names in the requests Testing with gcloud
I think there should be a mention of the workaround in the error message that the user gets in terraform before this gets fixed in the API |
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 v1.5.2
google v4.77.0
Affected Resource(s)
google_compute_instance
Terraform Configuration Files
Before:
After:
Expected Behavior
GCE instance is stopped (if running), Instance type and min_cpu_platform are updated
Actual Behavior
Plan shows the correct change:
but the apply fails with error "Error: googleapi: Error 400: The selected machine type (n2-standard-2) has a required CPU platform of cascadelake. The minimum CPU platform must match this, but was milan., badRequest"
Steps to Reproduce
terraform apply
of the "Before" codeterraform apply
of the "After" codeReferences
Similar issue to 14945
It is possible to work around this bug by doing a two step process. First change min_cpu_platform to "AUTOMATIC" and do an apply, then change to the new machine_type and min_cpu_platform
b/308755716
The text was updated successfully, but these errors were encountered: