Skip to content

Commit

Permalink
fixed a crash (#5133) (#3579)
Browse files Browse the repository at this point in the history
Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Aug 28, 2021
1 parent 184fcbd commit 7f775c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/5133.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: fixed a crash on `enable` field of `google_compute_router_peer`
```
3 changes: 3 additions & 0 deletions google-beta/resource_compute_router_peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,9 @@ func flattenNestedComputeRouterBgpPeerManagementType(v interface{}, d *schema.Re
}

func flattenNestedComputeRouterBgpPeerEnable(v interface{}, d *schema.ResourceData, config *Config) interface{} {
if v == nil {
return true
}
b, err := strconv.ParseBool(v.(string))
if err != nil {
// If we can't convert it into a bool return value as is and let caller handle it
Expand Down

0 comments on commit 7f775c6

Please sign in to comment.