@@ -4487,34 +4487,6 @@ func TestAccContainerCluster_withEnablePrivateEndpointToggle(t *testing.T) {
4487
4487
})
4488
4488
}
4489
4489
4490
- func TestAccContainerCluster_failedCreation (t * testing.T ) {
4491
- // Test that in a scenario where the cluster fails to create, a subsequent apply will delete the resource.
4492
- // Skip this test for now as we don't have a good way to force cluster creation to fail. https://github.com/hashicorp/terraform-provider-google/issues/13711
4493
- t .Skip ()
4494
- t .Parallel ()
4495
-
4496
- clusterName := fmt .Sprintf ("tf-test-cluster-%s" , acctest .RandString (t , 10 ))
4497
-
4498
- project := acctest .BootstrapProject (t , "tf-fail-cluster-" , envvar .GetTestBillingAccountFromEnv (t ), []string {"container.googleapis.com" })
4499
- acctest .RemoveContainerServiceAgentRoleFromContainerEngineRobot (t , project )
4500
-
4501
- acctest .VcrTest (t , resource.TestCase {
4502
- PreCheck : func () { acctest .AccTestPreCheck (t ) },
4503
- ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories (t ),
4504
- Steps : []resource.TestStep {
4505
- {
4506
- Config : testAccContainerCluster_failedCreation (clusterName , project .ProjectId ),
4507
- ExpectError : regexp .MustCompile ("timeout while waiting for state to become 'DONE'" ),
4508
- },
4509
- {
4510
- Config : testAccContainerCluster_failedCreation_update (clusterName , project .ProjectId ),
4511
- ExpectError : regexp .MustCompile ("Failed to create cluster" ),
4512
- Check : testAccCheckContainerClusterDestroyProducer (t ),
4513
- },
4514
- },
4515
- })
4516
- }
4517
-
4518
4490
func testAccContainerCluster_withEnablePrivateEndpoint (clusterName string , flag string ) string {
4519
4491
4520
4492
return fmt .Sprintf (`
@@ -7263,40 +7235,6 @@ resource "google_container_cluster" "primary" {
7263
7235
` , name , name , name )
7264
7236
}
7265
7237
7266
- func testAccContainerCluster_failedCreation (cluster , project string ) string {
7267
- return fmt .Sprintf (`
7268
- resource "google_container_cluster" "primary" {
7269
- name = "%s"
7270
- project = "%s"
7271
- location = "us-central1-a"
7272
- initial_node_count = 1
7273
-
7274
- workload_identity_config {
7275
- workload_pool = "%s.svc.id.goog"
7276
- }
7277
-
7278
- timeouts {
7279
- create = "40s"
7280
- }
7281
- deletion_protection = false
7282
- }` , cluster , project , project )
7283
- }
7284
-
7285
- func testAccContainerCluster_failedCreation_update (cluster , project string ) string {
7286
- return fmt .Sprintf (`
7287
- resource "google_container_cluster" "primary" {
7288
- name = "%s"
7289
- project = "%s"
7290
- location = "us-central1-a"
7291
- initial_node_count = 1
7292
-
7293
- workload_identity_config {
7294
- workload_pool = "%s.svc.id.goog"
7295
- }
7296
- deletion_protection = false
7297
- }` , cluster , project , project )
7298
- }
7299
-
7300
7238
func testAccContainerCluster_autopilot_minimal (name string ) string {
7301
7239
return fmt .Sprintf (`
7302
7240
resource "google_container_cluster" "primary" {
0 commit comments