From 4cebdda586155aec3f399f0fffc88d697e61086c Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 12 May 2023 11:03:27 -0700 Subject: [PATCH] Support new machine types for regional commitment (#7915) (#14593) Signed-off-by: Modular Magician --- .changelog/7915.txt | 3 +++ google/resource_compute_region_commitment.go | 16 ++++++++-------- .../r/compute_region_commitment.html.markdown | 8 ++++---- 3 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 .changelog/7915.txt diff --git a/.changelog/7915.txt b/.changelog/7915.txt new file mode 100644 index 00000000000..57f84d9f1ac --- /dev/null +++ b/.changelog/7915.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +compute: added support for additional machine types in `google_compute_region_commitment` +``` diff --git a/google/resource_compute_region_commitment.go b/google/resource_compute_region_commitment.go index 7581d0e7c23..8a20dc82db7 100644 --- a/google/resource_compute_region_commitment.go +++ b/google/resource_compute_region_commitment.go @@ -160,15 +160,15 @@ Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.`, }, }, "type": { - Type: schema.TypeString, - Computed: true, - Optional: true, - ForceNew: true, - ValidateFunc: verify.ValidateEnum([]string{"MEMORY_OPTIMIZED", "ACCELERATOR_OPTIMIZED", ""}), + Type: schema.TypeString, + Computed: true, + Optional: true, + ForceNew: true, Description: `The type of commitment, which affects the discount rate and the eligible resources. -Type MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized -machines. Type ACCELERATOR_OPTIMIZED specifies a commitment that will only apply to -accelerator optimized machines. Possible values: ["MEMORY_OPTIMIZED", "ACCELERATOR_OPTIMIZED"]`, +The type could be one of the following value: 'MEMORY_OPTIMIZED', 'ACCELERATOR_OPTIMIZED', +'GENERAL_PURPOSE_N1', 'GENERAL_PURPOSE_N2', 'GENERAL_PURPOSE_N2D', 'GENERAL_PURPOSE_E2', +'GENERAL_PURPOSE_T2D', 'GENERAL_PURPOSE_C3', 'COMPUTE_OPTIMIZED_C2', 'COMPUTE_OPTIMIZED_C2D' and +'GRAPHICS_OPTIMIZED_G2'`, }, "commitment_id": { Type: schema.TypeInt, diff --git a/website/docs/r/compute_region_commitment.html.markdown b/website/docs/r/compute_region_commitment.html.markdown index 9f33396cabe..c1123a86cad 100644 --- a/website/docs/r/compute_region_commitment.html.markdown +++ b/website/docs/r/compute_region_commitment.html.markdown @@ -107,10 +107,10 @@ The following arguments are supported: * `type` - (Optional) The type of commitment, which affects the discount rate and the eligible resources. - Type MEMORY_OPTIMIZED specifies a commitment that will only apply to memory optimized - machines. Type ACCELERATOR_OPTIMIZED specifies a commitment that will only apply to - accelerator optimized machines. - Possible values are: `MEMORY_OPTIMIZED`, `ACCELERATOR_OPTIMIZED`. + The type could be one of the following value: `MEMORY_OPTIMIZED`, `ACCELERATOR_OPTIMIZED`, + `GENERAL_PURPOSE_N1`, `GENERAL_PURPOSE_N2`, `GENERAL_PURPOSE_N2D`, `GENERAL_PURPOSE_E2`, + `GENERAL_PURPOSE_T2D`, `GENERAL_PURPOSE_C3`, `COMPUTE_OPTIMIZED_C2`, `COMPUTE_OPTIMIZED_C2D` and + `GRAPHICS_OPTIMIZED_G2` * `category` - (Optional)