diff --git a/build/terraform b/build/terraform index df63be6aeadc..8cebfb3a9719 160000 --- a/build/terraform +++ b/build/terraform @@ -1 +1 @@ -Subproject commit df63be6aeadc0b43c1de5c3562317e23abc1c409 +Subproject commit 8cebfb3a97199a7f93e6f7f34d84c085481221d7 diff --git a/build/terraform-beta b/build/terraform-beta index ea7e225ce8f4..1c8cd96d1b0a 160000 --- a/build/terraform-beta +++ b/build/terraform-beta @@ -1 +1 @@ -Subproject commit ea7e225ce8f4e5da9a14ef743b3196122e35b093 +Subproject commit 1c8cd96d1b0a225ac97487c3d25fb9269463d8b5 diff --git a/third_party/terraform/resources/resource_container_cluster.go.erb b/third_party/terraform/resources/resource_container_cluster.go.erb index a5d9193f2742..d364956e9db5 100644 --- a/third_party/terraform/resources/resource_container_cluster.go.erb +++ b/third_party/terraform/resources/resource_container_cluster.go.erb @@ -958,13 +958,16 @@ func resourceContainerClusterCreate(d *schema.ResourceData, meta interface{}) er if d.Get("remove_default_node_pool").(bool) { parent := fmt.Sprintf("%s/nodePools/%s", containerClusterFullName(project, location, clusterName), "default-pool") - op, err = config.clientContainerBeta.Projects.Locations.Clusters.NodePools.Delete(parent).Do() + err = retry(func() error { + op, err = config.clientContainerBeta.Projects.Locations.Clusters.NodePools.Delete(parent).Do() + return err + }) if err != nil { return errwrap.Wrapf("Error deleting default node pool: {{err}}", err) } err = containerOperationWait(config, op, project, location, "removing default node pool", timeoutInMinutes) if err != nil { - return errwrap.Wrapf("Error deleting default node pool: {{err}}", err) + return errwrap.Wrapf("Error while waiting to delete default node pool: {{err}}", err) } }