@@ -8416,32 +8416,36 @@ func TestAccContainerCluster_withEnablePrivateEndpointToggle(t *testing.T) {
84168416 subnetworkName := acctest.BootstrapSubnet(t, "gke-cluster", networkName)
84178417
84188418 acctest.VcrTest(t, resource.TestCase{
8419- PreCheck: func() { acctest.AccTestPreCheck(t) },
8419+ PreCheck: func() { acctest.AccTestPreCheck(t) },
84208420 ProtoV5ProviderFactories: acctest.ProtoV5ProviderFactories(t),
8421- CheckDestroy: testAccCheckContainerClusterDestroyProducer(t),
8421+ CheckDestroy: testAccCheckContainerClusterDestroyProducer(t),
84228422 Steps: []resource.TestStep{
84238423 {
84248424 Config: testAccContainerCluster_withEnablePrivateEndpoint(clusterName, "true", networkName, subnetworkName),
84258425 },
84268426 {
8427- ResourceName: "google_container_cluster.with_enable_private_endpoint",
8428- ImportState: true,
8429- ImportStateVerify: true,
8430- ImportStateVerifyIgnore: []string{"min_master_version", "deletion_protection"},
8427+ ResourceName: "google_container_cluster.with_enable_private_endpoint",
8428+ ImportState: true,
8429+ ImportStateVerify: true,
8430+ ImportStateVerifyIgnore: []string{"min_master_version", "deletion_protection"},
84318431 },
84328432 {
84338433 Config: testAccContainerCluster_withEnablePrivateEndpoint(clusterName, "false", networkName, subnetworkName),
8434+ ConfigPlanChecks: resource.ConfigPlanChecks{
8435+ PreApply: []plancheck.PlanCheck{
8436+ plancheck.ExpectResourceAction("google_container_cluster.with_enable_private_endpoint", plancheck.ResourceActionUpdate),
8437+ },
8438+ },
84348439 },
84358440 {
8436- ResourceName: "google_container_cluster.with_enable_private_endpoint",
8437- ImportState: true,
8438- ImportStateVerify: true,
8439- ImportStateVerifyIgnore: []string{"min_master_version", "deletion_protection"},
8441+ ResourceName: "google_container_cluster.with_enable_private_endpoint",
8442+ ImportState: true,
8443+ ImportStateVerify: true,
8444+ ImportStateVerifyIgnore: []string{"min_master_version", "deletion_protection"},
84408445 },
84418446 },
84428447 })
84438448}
8444-
84458449func testAccContainerCluster_withEnablePrivateEndpoint(clusterName, flag, networkName, subnetworkName string) string {
84468450 return fmt.Sprintf(`
84478451data "google_container_engine_versions" "uscentral1a" {
0 commit comments