Skip to content

Commit

Permalink
azurerm_network_interface - always send enable_accelerated_netw… (has…
Browse files Browse the repository at this point in the history
…hicorp#6289)

I managed to reproduce hashicorp#5954, this fixed it by always sending the value of enable_accelerated_networking to the api
  • Loading branch information
katbyte authored Mar 28, 2020
1 parent e64ac8b commit 315f4c3
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,11 @@ func resourceArmNetworkInterfaceUpdate(d *schema.ResourceData, meta interface{})

location := azure.NormalizeLocation(d.Get("location").(string))
update := network.Interface{
Name: utils.String(name),
Location: utils.String(location),
InterfacePropertiesFormat: &network.InterfacePropertiesFormat{},
Name: utils.String(name),
Location: utils.String(location),
InterfacePropertiesFormat: &network.InterfacePropertiesFormat{
EnableAcceleratedNetworking: utils.Bool(d.Get("enable_accelerated_networking").(bool)),
},
}

if d.HasChange("dns_servers") {
Expand All @@ -320,10 +322,6 @@ func resourceArmNetworkInterfaceUpdate(d *schema.ResourceData, meta interface{})
update.InterfacePropertiesFormat.DNSSettings.DNSServers = &dnsServers
}

if d.HasChange("enable_accelerated_networking") {
update.InterfacePropertiesFormat.EnableAcceleratedNetworking = utils.Bool(d.Get("enable_accelerated_networking").(bool))
}

if d.HasChange("enable_ip_forwarding") {
update.InterfacePropertiesFormat.EnableIPForwarding = utils.Bool(d.Get("enable_ip_forwarding").(bool))
}
Expand Down

0 comments on commit 315f4c3

Please sign in to comment.