Skip to content

Commit

Permalink
gke node pool: add 404 response code check on delete call (#4747)
Browse files Browse the repository at this point in the history
  • Loading branch information
roycaihw authored Apr 29, 2021
1 parent 6b807cf commit 5e16884
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ func resourceContainerNodePoolDelete(d *schema.ResourceData, meta interface{}) e
//Check cluster is in running state
_, err = containerClusterAwaitRestingState(config, nodePoolInfo.project, nodePoolInfo.location, nodePoolInfo.cluster, userAgent, d.Timeout(schema.TimeoutCreate))
if err != nil {
if isGoogleApiErrorWithCode(err, 404) {
log.Printf("[INFO] GKE node pool %s doesn't exist to delete", d.Id())
return nil
}
return err
}

Expand Down

0 comments on commit 5e16884

Please sign in to comment.