Open philip-harvey opened 1 year ago
Interesting. Below is what I got. The api returns 200 but with error message. Should this be treated as successful or failure? @zli82016
---[ RESPONSE ]--------------------------------------
HTTP/2.0 200 OK
{
"name": "projects/myproject/locations/global/operations/operation-1691939923148-602cf7619c02d-d9cc0af4-e88e40b5",
"metadata": {
"@type": "type.googleapis.com/google.cloud.networksecurity.v1beta1.OperationMetadata",
"createTime": "2023-08-13T15:18:43.158956099Z",
"endTime": "2023-08-13T15:18:43.278011003Z",
"target": "projects/myproject/locations/global/serverTlsPolicies/issue15453",
"verb": "update",
"requestedCancellation": false,
"apiVersion": "v1beta1"
},
"done": true,
"error": {
"code": 9,
"message": "Update not supported for ServerTlsPolicy created for External Load Balancer"
}
}
Interesting. Below is what I got. The api returns 200 but with error message. Should this be treated as successful or failure? @zli82016
---[ RESPONSE ]-------------------------------------- HTTP/2.0 200 OK { "name": "projects/myproject/locations/global/operations/operation-1691939923148-602cf7619c02d-d9cc0af4-e88e40b5", "metadata": { "@type": "type.googleapis.com/google.cloud.networksecurity.v1beta1.OperationMetadata", "createTime": "2023-08-13T15:18:43.158956099Z", "endTime": "2023-08-13T15:18:43.278011003Z", "target": "projects/myproject/locations/global/serverTlsPolicies/issue15453", "verb": "update", "requestedCancellation": false, "apiVersion": "v1beta1" }, "done": true, "error": { "code": 9, "message": "Update not supported for ServerTlsPolicy created for External Load Balancer" } }
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 machine_type
and the min_cpu
parameters
This was delegated to the Compute API team along with problems printing the correct platform names in the requests
Testing with gcloud
min_cpu_platform
AMD MilanStopping the VM
Trying to change min_cpu_platform
machine_type
min_cpu_platform
must be set to AUTOMATIC
. If not these 2 parameters block one another.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