Azure / Azure/azure-powershell
Set-AzureRmNetworkInterfaceIpConfig parameter ApplicationGatewayBackendAddressPool causes clearing of Subnet and more
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Cmdlet(s)
Set-AzureRmNetworkInterfaceIpConfig
### PowerShell Version
5.0 on W2012R2
5.1.15031.0 on W10
### Module Version
AzureRM.Network 3.4.0
### OS Version
W2012R2 & W10
### Description
Using the parameter ApplicationGatewayBackendAddressPool of CmdLet Set-AzureRmNetworkInterfaceIpConfig is causing the clearing of several fields:
"Subnet", "PublicIpAddress", "PrivateIpAddressVersion"
Further, the field "Primary" changes from True to False
NOTE 1: There might be more issues, as I was limited in testing and unable to test the fields: "LoadBalancerBackendAddressPools" and "LoadBalancerInboundNatRules"
NOTE 2: Same issue applies to a variant of the same CmdLet: "Set-AzureRmNetworkInterfaceIpConfig -ApplicationGatewayBackendAddressPoolId"
A consequence of this is that the command "Set-AzureRmNetworkInterface -NetworkInterface $nic" doesn't work anymore, and ARM giving an error stating e.g. the Subnet is not populated.
### Script/Steps for Reproduction
$gateway=Get-AzureRmApplicationGateway
$backendpool=Get-AzureRmApplicationGatewayBackendAddressPool -ApplicationGateway $gateway
$nic=Get-AzureRmNetworkInterface
Set-AzureRmNetworkInterfaceIpConfig -Name $nic.IpConfigurations.Name -NetworkInterface $nic -ApplicationGatewayBackendAddressPool $backendpool
Set-AzureRmNetworkInterface -NetworkInterface $nic
Contributor guide
Assessment
This issue has not been assessed yet.