Search code examples
azureazure-load-balancer

List frontend IP of Azure Internal Loadbalancer and Application Gateway


I am trying to pull an inventory of all the frontend IP addresses of Azure Internal Loadbalancer and Application Gateway and export them to a spreadsheet. I tried looking up, but the most results tend to be towards pulling the Public IP information.


Solution

  • Using Azure CLI the following command will pull the desired information. Make sure to be in the right subscription or add the parameter for it

    Load Balancer

    az network lb list --query "[].{ name: name, privateIpAddresses: join(', ', frontendIpConfigurations[*].privateIpAddress) }" -o tsv
    

    Application Gateway

    az network lb list --query "[].{ name: name, privateIpAddresses: join(', ', frontendIpConfigurations[*].privateIpAddress) }" -o tsv