provider/google: Unset the id for resource_google_project if the create operation fails (#13644)
This commit is contained in:
parent
0bd8c7acb2
commit
ae5332b42c
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue