diff --git a/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb b/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb index d0f53829a594..1a7ae1321cf2 100644 --- a/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb +++ b/mmv1/third_party/terraform/resources/resource_container_cluster.go.erb @@ -1103,7 +1103,6 @@ func resourceContainerCluster() *schema.Resource { Type: schema.TypeString, Required: true, ValidateFunc: validation.StringInSlice([]string{"UNSPECIFIED", "RAPID", "REGULAR", "STABLE"}, false), - DiffSuppressFunc: emptyOrDefaultStringSuppress("UNSPECIFIED"), Description: `The selected release channel. Accepted values are: * UNSPECIFIED: Not set. * RAPID: Weekly upgrade cadence; Early testers and developers who requires new features. @@ -3514,12 +3513,12 @@ func flattenVerticalPodAutoscaling(c *containerBeta.VerticalPodAutoscaling) []ma func flattenReleaseChannel(c *containerBeta.ReleaseChannel) []map[string]interface{} { result := []map[string]interface{}{} - if c != nil { + if c != nil && c.Channel != "" { result = append(result, map[string]interface{}{ "channel": c.Channel, }) } else { - // Explicitly set the release channel to the default. + // Explicitly set the release channel to the UNSPECIFIED. result = append(result, map[string]interface{}{ "channel": "UNSPECIFIED", }) diff --git a/mmv1/third_party/terraform/tests/resource_container_node_pool_test.go.erb b/mmv1/third_party/terraform/tests/resource_container_node_pool_test.go.erb index c97cbce0274b..0c9647bb7d38 100644 --- a/mmv1/third_party/terraform/tests/resource_container_node_pool_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_container_node_pool_test.go.erb @@ -1183,6 +1183,9 @@ resource "google_container_cluster" "cluster" { name = "%s" location = "us-central1-a" initial_node_count = 1 + release_channel { + channel = "UNSPECIFIED" + } } resource "google_container_node_pool" "np_with_management" {