Resource Graph Queries

Venu Gopal Krishna VV 100 Reputation points
2023-06-08T11:26:33.23+00:00

Hi,

I want some help in the Azure Resource Graph query to get details of firewall IP addresses.

can someone please help on this with the Query ?. appreciate for help.

Azure Firewall
Azure Firewall
An Azure network security service that is used to protect Azure Virtual Network resources.
779 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,423 questions
0 comments No comments
{count} votes

Accepted answer
  1. KapilAnanth-MSFT 49,536 Reputation points Microsoft Employee Moderator
    2023-06-08T12:51:09.0233333+00:00

    @Venu Gopal Krishna VV

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.

    I understand that you would like to know the Resource Graph to get the Public IP Address and Private IP Address of an Azure Firewall.

    If this is incorrect, please do let me know.

    You can use the below query.

    • This first gets the Firewall, Private IP address and Public IP Address ID.
    • Then uses the Public IP Address ID and JOIN method to get the actual IP Address
    
    Resources
    | where type =~ 'microsoft.network/azureFirewalls'
    | project Firewall_Id = id, ipConfigurations = properties.ipConfigurations
    | mvexpand ipConfigurations
    | project Firewall_Id, privateIpAddress = tostring(ipConfigurations.properties.privateIPAddress), publicIPId = tostring(ipConfigurations.properties.publicIPAddress.id)
    | join kind=leftouter(
        Resources
        | where type =~ 'microsoft.network/publicipaddresses'
        | project  publicIPId = id, publicIpAddress = properties.ipAddress)
    on publicIPId
    | project-away publicIPId1
    

    Kindly let us know if this helps or you need further assistance on this issue.

    Thanks,

    Kapil


    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.


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.