From 94e0afba61d6a7240f897c6f36104c31b822a43d Mon Sep 17 00:00:00 2001 From: Nathan McKinley Date: Tue, 27 Nov 2018 00:27:40 +0000 Subject: [PATCH] Add to state before we send the create call. --- google-beta/resource_dataproc_cluster.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/google-beta/resource_dataproc_cluster.go b/google-beta/resource_dataproc_cluster.go index 9ae6ed34fb..2738b31e13 100644 --- a/google-beta/resource_dataproc_cluster.go +++ b/google-beta/resource_dataproc_cluster.go @@ -442,7 +442,9 @@ func resourceDataprocClusterCreate(d *schema.ResourceData, meta interface{}) err waitErr := dataprocClusterOperationWait(config, op, "creating Dataproc cluster", timeoutInMinutes, 3) if waitErr != nil { // The resource didn't actually create - d.SetId("") + // Note that we do not remove the ID here - this resource tends to leave + // partially created clusters behind, so we'll let the next Read remove + // it. return waitErr }