Skip to content

Commit

Permalink
fix update of source_port_ranges (#26883)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephybun authored Jul 31, 2024
1 parent d3b5595 commit ee583da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/services/network/network_security_rule_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,12 @@ func resourceNetworkSecurityRuleUpdate(d *pluginsdk.ResourceData, meta interface

if d.HasChange("source_port_ranges") {
var sourcePortRanges []string
r := d.Get("destination_port_range").(*pluginsdk.Set).List()
r := d.Get("source_port_ranges").(*pluginsdk.Set).List()
for _, v := range r {
s := v.(string)
sourcePortRanges = append(sourcePortRanges, s)
}
payload.Properties.DestinationPortRanges = pointer.To(sourcePortRanges)
payload.Properties.SourcePortRanges = pointer.To(sourcePortRanges)
}

if d.HasChange("destination_port_range") {
Expand Down

0 comments on commit ee583da

Please sign in to comment.