Skip to content

Commit

Permalink
Merge pull request #480 from terraform-providers/vmss-accelerated-nw-…
Browse files Browse the repository at this point in the history
…crash

vmss: fixing a crash where accelerated networking isn't returned by the API
  • Loading branch information
tombuildsstuff authored Nov 1, 2017
2 parents 36b1208 + ac78458 commit 34b9e66
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions azurerm/resource_arm_virtual_machine_scale_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -898,9 +898,12 @@ func flattenAzureRmVirtualMachineScaleSetNetworkProfile(profile *compute.Virtual
result := make([]map[string]interface{}, 0, len(*networkConfigurations))
for _, netConfig := range *networkConfigurations {
s := map[string]interface{}{
"name": *netConfig.Name,
"primary": *netConfig.VirtualMachineScaleSetNetworkConfigurationProperties.Primary,
"accelerated_networking": *netConfig.VirtualMachineScaleSetNetworkConfigurationProperties.EnableAcceleratedNetworking,
"name": *netConfig.Name,
"primary": *netConfig.VirtualMachineScaleSetNetworkConfigurationProperties.Primary,
}

if v := netConfig.VirtualMachineScaleSetNetworkConfigurationProperties.EnableAcceleratedNetworking; v != nil {
s["accelerated_networking"] = *v
}

if v := netConfig.VirtualMachineScaleSetNetworkConfigurationProperties.NetworkSecurityGroup; v != nil {
Expand Down

0 comments on commit 34b9e66

Please sign in to comment.