Skip to content

Commit 2266970

Browse files
Ensure that no matter what the ID is, we can still wait for state. (#3241) (#1846)
Signed-off-by: Modular Magician <[email protected]>
1 parent 0b1f744 commit 2266970

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.changelog/3241.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
container: `google_container_node_pool` resources created in the 2.X series were failing to update after 3.11.
3+
```

google-beta/resource_container_node_pool.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,8 +367,9 @@ func resourceContainerNodePoolUpdate(d *schema.ResourceData, meta interface{}) e
367367
if err != nil {
368368
return err
369369
}
370+
name := getNodePoolName(d.Id())
370371

371-
_, err = containerNodePoolAwaitRestingState(config, d.Id(), d.Timeout(schema.TimeoutUpdate))
372+
_, err = containerNodePoolAwaitRestingState(config, nodePoolInfo.fullyQualifiedName(name), d.Timeout(schema.TimeoutUpdate))
372373
if err != nil {
373374
return err
374375
}
@@ -379,7 +380,7 @@ func resourceContainerNodePoolUpdate(d *schema.ResourceData, meta interface{}) e
379380
}
380381
d.Partial(false)
381382

382-
_, err = containerNodePoolAwaitRestingState(config, d.Id(), d.Timeout(schema.TimeoutUpdate))
383+
_, err = containerNodePoolAwaitRestingState(config, nodePoolInfo.fullyQualifiedName(name), d.Timeout(schema.TimeoutUpdate))
383384
if err != nil {
384385
return err
385386
}
@@ -397,7 +398,7 @@ func resourceContainerNodePoolDelete(d *schema.ResourceData, meta interface{}) e
397398

398399
name := getNodePoolName(d.Id())
399400

400-
_, err = containerNodePoolAwaitRestingState(config, d.Id(), d.Timeout(schema.TimeoutDelete))
401+
_, err = containerNodePoolAwaitRestingState(config, nodePoolInfo.fullyQualifiedName(name), d.Timeout(schema.TimeoutDelete))
401402
if err != nil {
402403
return err
403404
}

0 commit comments

Comments
 (0)