Azure Cli command to add virtual machine in application gateway backend connection pool

Bharath-FT 21 Reputation points
2022-10-26T13:27:36.9+00:00

Hi,

I've tried updating backendip-address in application gateway backend pool successfully. But, when tried the same for updating the Virtual machine in application gateway backend pool. It is throwing exception to check the syntax.
Kindly let me know, how to add/remove the virtual machine in backend pool of application gateway using Azure-Cli.

Thanks & Regards
Bharath

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,001 questions
Azure ISV (Independent Software Vendors) and Startups
Azure ISV (Independent Software Vendors) and Startups
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.ISV (Independent Software Vendors) and Startups: A Microsoft program that helps customers adopt Microsoft Cloud solutions and drive user adoption.
91 questions
{count} votes

Accepted answer
  1. AnuragSingh-MSFT 21,236 Reputation points
    2022-10-27T04:51:57.417+00:00

    @Bharath-FT , thank you for posting this question here. I understand that you are trying to update the backend pool of application gateway so that it can point to the VMs with your application installed.

    Edit 10/31/2022

    The following are some resources that should help you with this issue:

    az network application-gateway address-pool - can be used to manage the address pools of an application gateway. The following link has samples to update, add and delete IPs from existing pools -
    az network application-gateway address-pool update. Note the use of index for removing existing IP address, while IP address is used for update or add.

    Please note that the routing in Application Gateway happens based on the IP/FQDN and not the VM Name. Therefore, the "VM Name" itself is not a valid type to be used for updating the backend addresses. For more details, please see How an application gateway routes a request and ApplicationGatewayBackendAddress in Application Gateway ARM Template

    Even in the portal, when updating the Application Gateway's backend pool, if Type is selected as Virtual machine --> the available options are NICs associated to that VM and not the VM itself.

    255007-image.png

    Please let us know if you have any questions.


0 additional answers

Sort by: Most helpful