mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
Retry creation of Cloud IoT registry (#1713)
This can fail with 503, which is a transient error.
This commit is contained in:
parent
ae39b9fafb
commit
4a41eaad77
@ -225,7 +225,10 @@ func resourceCloudIoTRegistryCreate(d *schema.ResourceData, meta interface{}) er
|
||||
registryId := fmt.Sprintf("%s/registries/%s", parent, deviceRegistry.Id)
|
||||
d.SetId(registryId)
|
||||
|
||||
_, err = config.clientCloudIoT.Projects.Locations.Registries.Create(parent, deviceRegistry).Do()
|
||||
err = retryTime(func() error {
|
||||
_, err := config.clientCloudIoT.Projects.Locations.Registries.Create(parent, deviceRegistry).Do()
|
||||
return err
|
||||
}, 5)
|
||||
if err != nil {
|
||||
d.SetId("")
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user