From 1fb0b93177bc0612d7f32a420f40c91129a02ba6 Mon Sep 17 00:00:00 2001 From: The Magician Date: Thu, 15 Apr 2021 10:55:44 -0700 Subject: [PATCH] promote min_node_cpus to GA for instance templates (#4701) (#8921) Signed-off-by: Modular Magician --- .changelog/4701.txt | 3 +++ google/resource_compute_instance_template.go | 7 +++++++ google/resource_compute_instance_template_test.go | 1 + 3 files changed, 11 insertions(+) create mode 100644 .changelog/4701.txt diff --git a/.changelog/4701.txt b/.changelog/4701.txt new file mode 100644 index 00000000000..8ec013c0699 --- /dev/null +++ b/.changelog/4701.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google/resource_compute_instance_template.go b/google/resource_compute_instance_template.go index af5133b7659..b55191d51dd 100644 --- a/google/resource_compute_instance_template.go +++ b/google/resource_compute_instance_template.go @@ -23,6 +23,7 @@ var ( "scheduling.0.automatic_restart", "scheduling.0.preemptible", "scheduling.0.node_affinities", + "scheduling.0.min_node_cpus", } shieldedInstanceTemplateConfigKeys = []string{ @@ -452,6 +453,12 @@ func resourceComputeInstanceTemplate() *schema.Resource { DiffSuppressFunc: emptyOrDefaultStringSuppress(""), Description: `Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems.`, }, + "min_node_cpus": { + Type: schema.TypeInt, + Optional: true, + AtLeastOneOf: schedulingInstTemplateKeys, + Description: `Minimum number of cpus for the instance.`, + }, }, }, }, diff --git a/google/resource_compute_instance_template_test.go b/google/resource_compute_instance_template_test.go index 5d641f590cb..bcc82dcd24e 100644 --- a/google/resource_compute_instance_template_test.go +++ b/google/resource_compute_instance_template_test.go @@ -2129,6 +2129,7 @@ resource "google_compute_instance_template" "foobar" { values = ["testinstancetemplate"] } + min_node_cpus = 2 } service_account {