From f5ee262c8ff7b5025666bbb7692217a22d46962d Mon Sep 17 00:00:00 2001 From: Modular Magician Date: Fri, 2 Oct 2020 00:20:28 +0000 Subject: [PATCH] Modify test to use lowercase, add case diff suppress on node config image_type (#4029) Signed-off-by: Modular Magician --- .changelog/4029.txt | 3 +++ google/node_config.go | 7 ++++--- google/resource_container_cluster_test.go | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 .changelog/4029.txt diff --git a/.changelog/4029.txt b/.changelog/4029.txt new file mode 100644 index 00000000000..c03a811b4e5 --- /dev/null +++ b/.changelog/4029.txt @@ -0,0 +1,3 @@ +```release-note:bug +container: fixed `node_config.image_type` perma-diff when specified in lower case. +``` diff --git a/google/node_config.go b/google/node_config.go index 207efbc66f7..d4c277e49df 100644 --- a/google/node_config.go +++ b/google/node_config.go @@ -67,9 +67,10 @@ func schemaNodeConfig() *schema.Schema { }, "image_type": { - Type: schema.TypeString, - Optional: true, - Computed: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + DiffSuppressFunc: caseDiffSuppress, }, "labels": { diff --git a/google/resource_container_cluster_test.go b/google/resource_container_cluster_test.go index ca2882f65e7..bb8fd4e36ef 100644 --- a/google/resource_container_cluster_test.go +++ b/google/resource_container_cluster_test.go @@ -2247,7 +2247,7 @@ resource "google_container_cluster" "with_node_config" { } // Updatable fields - image_type = "COS" + image_type = "cos" } } `, clusterName)