Dmitry Porotnikov / Simple ARG query to find a NIC by private ip via Azure Resource Graph

Created Wed, 23 Apr 2025 00:00:00 +0000 Modified Wed, 23 Apr 2025 00:00:00 +0000
46 Words

Simple ARG query to find a NIC by private ip via Azure Resource Graph


resources
    | where type == 'microsoft.network/networkinterfaces'
    | mv-expand ipconf = properties.ipConfigurations
    | extend privateIp = tostring(ipconf.properties.privateIPAddress)
    | extend nicId = tolower(id)
    | where privateIp has "REPLACE WITH IP"
    | project nicId, privateIp