Azure / Azure/azure-cli

Unable to remove VMSS from the Application Gateway backend pool

Open
#16,520 6 comments 0 reactions 1 assignee Claimed by @qwordy View on GitHub
act-observability-squad Compute feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

Unable to remove VMSS from the Application Gateway backend pool using CLI.

samuel@Azure:~$ **az --version**
**azure-cli 2.17.1**

**Add VMSS to App Gw Backend pool works fine:**

az vmss update --resource-group vnet3 --name testvmss --add virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations[0].ApplicationGatewayBackendAddressPools '{"id": "/subscriptions/6d79ea49-de76-4ab4-867d-06fc8866599e/resourceGroups/vnet3/providers/Microsoft.Network/applicationGateways/Appgwassessment/backendAddressPools/backendpool2"}'

**Same command with --remove switch does not work:**

az vmss update --resource-group vnet3 --name testvmss --remove virtualMachineProfile.networkProfile.networkInterfaceConfigurations[0].ipConfigurations[0].ApplicationGatewayBackendAddressPools '{"id": "/subscriptions/6d79ea49-de76-4ab4-867d-06fc8866599e/resourceGroups/vnet3/providers/Microsoft.Network/applicationGateways/Appgwassessment/backendAddressPools/backendpool2"}'

_invalid syntax: --remove property.list OR --remove propertyToRemove_

**Remove works fine if the backend pool is IP/FQDN:**
az network application-gateway address-pool update -g vnet3 --gateway-name Appgwassessment --name backendpool2 --remove **backendAddresses** 0

**Remove Command gets executed without error but doesn’t remove the VMSS from backendpool:**
az network application-gateway address-pool update -g vnet3 --gateway-name Appgwassessment --name backendpool2 --remove **backendIpConfigurations** 0

**Tried various combinations, but no luck:**
az network application-gateway address-pool update -g vnet3 --gateway-name Appgwassessment --name backendpool2 --remove backendIpConfigurations '{"VMSS":"testvmss"}'

_invalid syntax: --remove property.list OR --remove propertyToRemove_

az network application-gateway address-pool update -g vnet3 --gateway-name Appgwassessment --name backendpool2 --remove backendIpConfigurations '{"id": "/subscriptions/6d79ea49-de76-4ab4-867d-06fc8866599e/resourceGroups/vnet3/providers/Microsoft.Compute/virtualMachineScaleSets/testvmss/virtualMachines/6/networkInterfaces/Appgwtesting-nic01/ipConfigurations/Appgwtesting-nic01-defaultIpConfiguration"}'

_invalid syntax: --remove property.list OR --remove propertyToRemove_

**Came across this GitHub issue but did not find any solution there:**

https://github.com/Azure/azure-cli/issues/1622
https://github.com/Azure/azure-cli/issues/2586

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.