Skip to content

Commit

Permalink
Ensure that no matter what the ID is, we can still wait for state. (#…
Browse files Browse the repository at this point in the history
…3241) (#1846)

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Mar 10, 2020
1 parent 0b1f744 commit 2266970
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/3241.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
container: `google_container_node_pool` resources created in the 2.X series were failing to update after 3.11.
```
7 changes: 4 additions & 3 deletions google-beta/resource_container_node_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,9 @@ func resourceContainerNodePoolUpdate(d *schema.ResourceData, meta interface{}) e
if err != nil {
return err
}
name := getNodePoolName(d.Id())

_, err = containerNodePoolAwaitRestingState(config, d.Id(), d.Timeout(schema.TimeoutUpdate))
_, err = containerNodePoolAwaitRestingState(config, nodePoolInfo.fullyQualifiedName(name), d.Timeout(schema.TimeoutUpdate))
if err != nil {
return err
}
Expand All @@ -379,7 +380,7 @@ func resourceContainerNodePoolUpdate(d *schema.ResourceData, meta interface{}) e
}
d.Partial(false)

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

name := getNodePoolName(d.Id())

_, err = containerNodePoolAwaitRestingState(config, d.Id(), d.Timeout(schema.TimeoutDelete))
_, err = containerNodePoolAwaitRestingState(config, nodePoolInfo.fullyQualifiedName(name), d.Timeout(schema.TimeoutDelete))
if err != nil {
return err
}
Expand Down

0 comments on commit 2266970

Please sign in to comment.