Skip to content

Commit fbb7844

Browse files
fix skipping node pool deletion log message (#4827) (#3293)
the isGoogleApiErrorWithCode checks the existence of the cluster, not the node pool Signed-off-by: Modular Magician <[email protected]>
1 parent 58bad94 commit fbb7844

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.changelog/4827.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/resource_container_node_pool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ func resourceContainerNodePoolDelete(d *schema.ResourceData, meta interface{}) e
482482
_, err = containerClusterAwaitRestingState(config, nodePoolInfo.project, nodePoolInfo.location, nodePoolInfo.cluster, userAgent, d.Timeout(schema.TimeoutCreate))
483483
if err != nil {
484484
if isGoogleApiErrorWithCode(err, 404) {
485-
log.Printf("[INFO] GKE node pool %s doesn't exist to delete", d.Id())
485+
log.Printf("[INFO] GKE cluster %s doesn't exist, skipping node pool %s deletion", nodePoolInfo.cluster, d.Id())
486486
return nil
487487
}
488488
return err

0 commit comments

Comments
 (0)