provider/google: Unset the id for resource_google_project if the create operation fails (#13644)

This commit is contained in:
Dana Hoffman 2017-04-13 16:16:47 -07:00 committed by GitHub
parent 0bd8c7acb2
commit ae5332b42c
1 changed files with 2 additions and 0 deletions

View File

@ -105,6 +105,8 @@ func resourceGoogleProjectCreate(d *schema.ResourceData, meta interface{}) error
// Wait for the operation to complete // Wait for the operation to complete
waitErr := resourceManagerOperationWait(config, op, "project to create") waitErr := resourceManagerOperationWait(config, op, "project to create")
if waitErr != nil { if waitErr != nil {
// The resource wasn't actually created
d.SetId("")
return waitErr return waitErr
} }