Search IP with Azure Resource Graph
In a large environment, it’s always a challenge to find the IP address of a specific resource or use IP ranges. Azure Resource Graph is a powerful tool for querying Azure resources. In this post, I’ll show you how to search for an IP address using Azure Resource Graph. Ideally, you’d have IPAM or another tool to manage IP addresses, but sometimes you need to find one quickly, and/or not everyone has access to IPAM. So:
1
2
3
4
5
resources
| where type =~ 'microsoft.network/virtualnetworks'
| mv-expand addressSpace=properties.addressSpace.addressPrefixes
| where ipv4_is_match('10.100.0.0/28', tostring(addressSpace))
| project name, subscriptionId, resourceGroup, location, addressSpace
and that is it. You can change the IP range to whatever you need, so IP or IP range also good
This post is licensed under CC BY 4.0 by the author.