I have subnet that shows 3 available IPs as below. Is there a quick way to fetch the first 2 available IPs?
For a given Azure subnet how to find the first two available private IPs?
I tried in my environment and got the below results:
In my environment, I have 58 available IP addresses.
You can use the azure cli command below to fetch the first 2 available Ip addresses.
Command:
az network vnet subnet list-available-ips --resource-group <your-resource-grp> --vnet-name vnet01 -n subnet-1 --query [0:2]
Output:
[
"10.1.6.5",
"10.1.6.6"
]
Reference: