How to get the dynamically allocated private IP of an Application GW instance?

Tal Abramovitch 20 Reputation points
2023-06-20T12:39:44.9133333+00:00

I am using the Azure Python SDK to retrieve a list of all Application Gateway instances in a subscription. For each instance, I need to gather additional data and export it to a third-party API. One part of my logic involves collecting the IP addresses associated with each instance, which currently includes only the frontend IP configuration (private and public IP). However, I also need to include the dynamically allocated private IP address that the instance uses to communicate with its backend pool.

I have attempted to explore the instance attributes and read through the documentation, but so far, I have been unable to find the dynamically allocated private IP.
I am unsure if this IP is exposed through the SDK.

Am I correct in my assumption? Is there a way to retrieve this dynamically allocated private IP using the Azure SDK?

Thank you for your assistance.

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,217 questions
{count} votes

Accepted answer
  1. ChaitanyaNaykodi-MSFT 27,481 Reputation points Microsoft Employee Moderator
    2023-06-21T01:02:07.55+00:00

    @Tal Abramovitch

    Thank you for posting a detailed question here.

    If I understand it correctly you want to fetch private IP address used by the Application gateway instance, which is dynamically allocated from Application gateway subnet.

    This IP cannot be fetched as it is not exposed by the Application Gateway, although as documented here the IP addresses are allocated from the beginning of the defined subnet space for gateway instances, which can help estimate the IP addresses. In general, if you need these IPs for any firewall configuration its recommended to whitelist the whole Application Gateway Subnet address space as when App Gatwy scales it uses the available IPs from the subnet.

    Based on your use case if you wish to have this feature, please file a feature request on our feedback portal

    Hope this helps! Please let me know if you have any additional questions. Thank you!


    ​​Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.