@Eric T ,
Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
Please note that your question is not rightly put.
- Not all Azure PaaS resources have a Public IP even if they are accessible from Internet.
- They have FQDNs
- For e.g.,
- A storage account's blob endPoint would have an FQDN of "<YOURSTORAGEACCOUNTNAME>.blob.core.windows.net"
- The IP associated with it is not static and can change
- Customers are requested to access this PaaS resource with the endPoint's FQDN and not the IP to which it resolved to
- So, the PaaS resource never had an IP associated with it
- The same goes for Azure Database which uses "<YOURDBName>.database.windows.net" endpoint.
With that said, certain PaaS Services are associated with a Public IP
- Provided that you create the Public IP as an independent resource along with the PaaS resource
- Some e.g., include VPN gateway, Load Balancer, App Gateway, Virtual Machines (NICs), Azure Firewall
- In these cases, we can query for the PaaS/IaaS services based on whether or not they contain IP Addresses.
You can use : Azure Resource Graph
The query would be something like,
Resources
| where properties contains "/providers/Microsoft.Network/publicIPAddresses/"
| project name, id, type
If you know the IP Address and would like to query for the resource that uses this IP,
- First run,
Resources
| where type contains 'publicIPAddresses' and properties.ipAddress == "<YOURIPADDRESS>"
| project id
- This would give you the Public IP's Resource ID
- Use this Resource ID in the below query to get the resource to which it is associated
Resources
| where properties contains "<RESOURCEIDFROMPREVIOUSQUERY>"
- The above will list the resource which is using the Public IP
NOTE:
- You can use "or" operator to combine 2 or more Public IP Addresses
- And you can modify the above query to match your requirement
Hope this helps
Thanks,
Kapil
Please Accept an answer if correct.
Original posters help the community find answers faster by identifying the correct answer.