Skip to content

Commit

Permalink
Add to state before we send the create call. (#2527)
Browse files Browse the repository at this point in the history
  • Loading branch information
modular-magician authored and nat-henderson committed Nov 27, 2018
1 parent ca54b30 commit 0c61f24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion google/resource_dataproc_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 0c61f24

Please sign in to comment.