add retries on create for container cluster (#2352)

<!-- This change is generated by MagicModules. -->
/cc @danawillow
This commit is contained in:
The Magician 2018-10-29 13:17:51 -07:00 committed by Nathan McKinley
parent b857fd457c
commit b7801660c9

View File

@ -659,7 +659,11 @@ func resourceContainerClusterCreate(d *schema.ResourceData, meta interface{}) er
defer mutexKV.Unlock(containerClusterMutexKey(project, location, clusterName))
parent := fmt.Sprintf("projects/%s/locations/%s", project, location)
op, err := config.clientContainerBeta.Projects.Locations.Clusters.Create(parent, req).Do()
var op interface{}
err = retry(func() error {
op, err = config.clientContainerBeta.Projects.Locations.Clusters.Create(parent, req).Do()
return err
})
if err != nil {
return err
}