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.