-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
- Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
- If an issue is assigned to a user, that user is claiming responsibility for the issue.
- Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.
Terraform Version & Provider Version(s)
Terraform vX.X.X
on
- provider registry.terraform.io/hashicorp/google vX.X.X
- provider registry.terraform.io/hashicorp/google-beta vX.X.X
Affected Resource(s)
- google_compute_region_commitment
Terraform Configuration
resource "google_compute_region_commitment" "cud-6-n1-us-east1" {
name = "cud-6-n1-us-east1"
plan = "THIRTY_SIX_MONTH"
type = "GENERAL_PURPOSE_N1" # This value causes an error
category = "MACHINE"
auto_renew = false
region = "us-east1"
resources {
type = "VCPU"
amount = "750"
}
resources {
type = "MEMORY"
amount = "2816000"
}
}Debug Output
No response
Expected Behavior
The Terraform provider documentation should accurately reflect a valid value accepted by the Google Cloud Compute Engine API. The resource should be created successfully when using a type value listed in the documentation.
Actual Behavior
When using type = "GENERAL_PURPOSE_N1" as listed in the Terraform provider documentation, the Google Cloud API returns a 503 internal error.
This indicates that GENERAL_PURPOSE_N1 is not a valid type in the backend API. Per Google documentation, GENERAL_PURPOSE should be used if N1 machine types are desired.
Steps to reproduce
- Configure the
google_compute_region_commitmentresource as shown above. terraform apply
Important Factoids
No response
References
- Terraform Provider Documentation: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_region_commitment#type-1:~:text=%2C%20ACCELERATOR_OPTIMIZED%2C-,GENERAL_PURPOSE_N1,-%2C%20GENERAL_PURPOSE_N2%2C
- Google Cloud API documentation for commitments: https://cloud.google.com/compute/docs/reference/rest/v1/regionCommitments
- Related closed GitHub Issue: Support more compute types for google_compute_region_commitment #14560 (This issue added several new types, including GENERAL_PURPOSE_N1, to the documentation).
Suggested Correction:
The type GENERAL_PURPOSE_N1 should be removed from the list of valid types in the documentation for the google_compute_region_commitment resource. The correct type for N1 machine series commitments is GENERAL_PURPOSE.