Skip to content

Commit

Permalink
fix: Router advertised-route-priority undefined behavior (#11613) (#1…
Browse files Browse the repository at this point in the history
…9366)

[upstream:293c3ca1b6f2de4ce5d731aa8f0c3a65969cc9ac]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Sep 4, 2024
1 parent 40adff8 commit 53743c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/11613.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
compute: fixed a bug where `advertised_route_priority` was accidentally set to 0 during updates in 'google_compute_router_peer'
```
4 changes: 2 additions & 2 deletions google/services/compute/resource_compute_router_peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ func resourceComputeRouterBgpPeerCreate(d *schema.ResourceData, meta interface{}
advertisedRoutePriorityProp, err := expandNestedComputeRouterBgpPeerAdvertisedRoutePriority(d.Get("advertised_route_priority"), d, config)
if err != nil {
return err
} else if v, ok := d.GetOkExists("advertised_route_priority"); ok || !reflect.DeepEqual(v, advertisedRoutePriorityProp) {
} else if v, ok := d.GetOk("advertised_route_priority"); ok || !reflect.DeepEqual(v, advertisedRoutePriorityProp) {
obj["advertisedRoutePriority"] = advertisedRoutePriorityProp
}
advertiseModeProp, err := expandNestedComputeRouterBgpPeerAdvertiseMode(d.Get("advertise_mode"), d, config)
Expand Down Expand Up @@ -726,7 +726,7 @@ func resourceComputeRouterBgpPeerUpdate(d *schema.ResourceData, meta interface{}
advertisedRoutePriorityProp, err := expandNestedComputeRouterBgpPeerAdvertisedRoutePriority(d.Get("advertised_route_priority"), d, config)
if err != nil {
return err
} else if v, ok := d.GetOkExists("advertised_route_priority"); ok || !reflect.DeepEqual(v, advertisedRoutePriorityProp) {
} else if v, ok := d.GetOk("advertised_route_priority"); ok || !reflect.DeepEqual(v, advertisedRoutePriorityProp) {
obj["advertisedRoutePriority"] = advertisedRoutePriorityProp
}
advertiseModeProp, err := expandNestedComputeRouterBgpPeerAdvertiseMode(d.Get("advertise_mode"), d, config)
Expand Down

0 comments on commit 53743c9

Please sign in to comment.