diff --git a/mmv1/third_party/terraform/tests/resource_container_cluster_test.go.erb b/mmv1/third_party/terraform/tests/resource_container_cluster_test.go.erb index d25fff55a7be..2952896162fe 100755 --- a/mmv1/third_party/terraform/tests/resource_container_cluster_test.go.erb +++ b/mmv1/third_party/terraform/tests/resource_container_cluster_test.go.erb @@ -990,7 +990,7 @@ func TestAccContainerCluster_withNodePoolDefaults(t *testing.T) { Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("google_container_cluster.with_node_pool_defaults", "node_pool_defaults.0.node_config_defaults.0.gcfs_config.#", "1"), - resource.TestCheckResourceAttr("google_container_cluster.with_node_pool_defaults", + resource.TestCheckResourceAttr("google_container_cluster.with_node_pool_defaults", "node_pool_defaults.0.node_config_defaults.0.gcfs_config.0.enabled", "true"), ), }, @@ -2287,12 +2287,13 @@ func TestAccContainerCluster_withMonitoringConfig(t *testing.T) { CheckDestroy: testAccCheckContainerClusterDestroyProducer(t), Steps: []resource.TestStep{ { - Config: testAccContainerCluster_basic(clusterName), + Config: testAccContainerCluster_basic_1_23_8(clusterName), }, { ResourceName: "google_container_cluster.primary", ImportState: true, ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"min_master_version"}, }, { Config: testAccContainerCluster_withMonitoringConfigEnabled(clusterName), @@ -2302,6 +2303,7 @@ func TestAccContainerCluster_withMonitoringConfig(t *testing.T) { ResourceName: "google_container_cluster.primary", ImportState: true, ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"min_master_version"}, }, { Config: testAccContainerCluster_withMonitoringConfigUpdated(clusterName), @@ -2310,6 +2312,7 @@ func TestAccContainerCluster_withMonitoringConfig(t *testing.T) { ResourceName: "google_container_cluster.primary", ImportState: true, ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"min_master_version"}, }, { Config: testAccContainerCluster_withMonitoringConfigPrometheusUpdated(clusterName), @@ -2318,15 +2321,17 @@ func TestAccContainerCluster_withMonitoringConfig(t *testing.T) { ResourceName: "google_container_cluster.primary", ImportState: true, ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"min_master_version"}, }, // Back to basic settings to test setting Prometheus on its own { - Config: testAccContainerCluster_basic(clusterName), + Config: testAccContainerCluster_basic_1_23_8(clusterName), }, { ResourceName: "google_container_cluster.primary", ImportState: true, ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"min_master_version"}, }, { Config: testAccContainerCluster_withMonitoringConfigPrometheusOnly(clusterName), @@ -2335,15 +2340,17 @@ func TestAccContainerCluster_withMonitoringConfig(t *testing.T) { ResourceName: "google_container_cluster.primary", ImportState: true, ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"min_master_version"}, }, <% end -%> { - Config: testAccContainerCluster_basic(clusterName), + Config: testAccContainerCluster_basic_1_23_8(clusterName), }, { ResourceName: "google_container_cluster.primary", ImportState: true, ImportStateVerify: true, + ImportStateVerifyIgnore: []string{"min_master_version"}, }, }, }) @@ -6079,12 +6086,24 @@ resource "google_container_cluster" "primary" { `, name) } +func testAccContainerCluster_basic_1_23_8(name string) string { + return fmt.Sprintf(` +resource "google_container_cluster" "primary" { + name = "%s" + location = "us-central1-a" + initial_node_count = 1 + min_master_version = "1.23.8-gke.1900" +} +`, name) +} + func testAccContainerCluster_withMonitoringConfigEnabled(name string) string { return fmt.Sprintf(` resource "google_container_cluster" "primary" { name = "%s" location = "us-central1-a" initial_node_count = 1 + min_master_version = "1.23.8-gke.1900" monitoring_config { enable_components = [ "SYSTEM_COMPONENTS", "APISERVER", "CONTROLLER_MANAGER", "SCHEDULER" ] } @@ -6099,6 +6118,7 @@ resource "google_container_cluster" "primary" { name = "%s" location = "us-central1-a" initial_node_count = 1 + min_master_version = "1.23.8-gke.1900" monitoring_config { enable_components = [ "SYSTEM_COMPONENTS", "APISERVER", "CONTROLLER_MANAGER", "SCHEDULER", "WORKLOADS" ] } @@ -6112,6 +6132,7 @@ resource "google_container_cluster" "primary" { name = "%s" location = "us-central1-a" initial_node_count = 1 + min_master_version = "1.23.8-gke.1900" monitoring_config { enable_components = [ "SYSTEM_COMPONENTS", "APISERVER", "CONTROLLER_MANAGER", "SCHEDULER", "WORKLOADS" ] managed_prometheus { @@ -6128,6 +6149,7 @@ resource "google_container_cluster" "primary" { name = "%s" location = "us-central1-a" initial_node_count = 1 + min_master_version = "1.23.8-gke.1900" monitoring_config { managed_prometheus { enabled = true