Skip to content

Commit

Permalink
Make errcheck happy
Browse files Browse the repository at this point in the history
  • Loading branch information
rileykarson committed Apr 5, 2019
1 parent 524a6eb commit 34ebe5d
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,11 @@ func resourceContainerClusterCreate(d *schema.ResourceData, meta interface{}) er
waitErr := containerOperationWait(config, op, project, location, "creating GKE cluster", timeoutInMinutes)
if waitErr != nil {
// Try a GET on the cluster so we can see the state in debug logs. This will help classify error states.
config.clientContainerBeta.Projects.Locations.Clusters.Get(containerClusterFullName(project, location, d.Get("name").(string))).Do()
_, getErr := config.clientContainerBeta.Projects.Locations.Clusters.Get(containerClusterFullName(project, location, clusterName)).Do()
if getErr != nil {
// Make errcheck happy
log.Printf("[WARN] Cluster %s was created in an error state and not found", clusterName)
}

if deleteErr := cleanFailedContainerCluster(d, meta); deleteErr != nil {
log.Printf("[WARN] Unable to clean up cluster from failed creation: %s", deleteErr)
Expand Down

0 comments on commit 34ebe5d

Please sign in to comment.