From 656a272f30864b1f6d47ec75df839ca5ddb1951a Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Mon, 19 Dec 2022 14:03:30 +0000 Subject: [PATCH] Fix container_cluster and container_node_pool permadiffs when location_policy is set (#6982) Signed-off-by: Modular Magician --- .changelog/6982.txt | 3 +++ google-beta/resource_container_node_pool.go | 1 + 2 files changed, 4 insertions(+) create mode 100644 .changelog/6982.txt diff --git a/.changelog/6982.txt b/.changelog/6982.txt new file mode 100644 index 0000000000..8ec013c069 --- /dev/null +++ b/.changelog/6982.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` diff --git a/google-beta/resource_container_node_pool.go b/google-beta/resource_container_node_pool.go index bce9893955..d4b5122575 100644 --- a/google-beta/resource_container_node_pool.go +++ b/google-beta/resource_container_node_pool.go @@ -160,6 +160,7 @@ var schemaNodePool = map[string]*schema.Schema{ "location_policy": { Type: schema.TypeString, Optional: true, + Computed: true, ValidateFunc: validation.StringInSlice([]string{"BALANCED", "ANY"}, false), Description: `Location policy specifies the algorithm used when scaling-up the node pool. "BALANCED" - Is a best effort policy that aims to balance the sizes of available zones. "ANY" - Instructs the cluster autoscaler to prioritize utilization of unused reservations, and reduces preemption risk for Spot VMs.`, },