-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Cant get all the available ips in a subnet #21382
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botNetworkaz network vnet/lb/nic/dns/etc...az network vnet/lb/nic/dns/etc...act-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.feature-request
Milestone
Metadata
Metadata
Assignees
Labels
Auto-AssignAuto assign by botAuto assign by botNetworkaz network vnet/lb/nic/dns/etc...az network vnet/lb/nic/dns/etc...act-quality-productivity-squadcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.feature-request
Describe the bug
I want to get all the available ips in all the subnets in a vnet.
What I've did is to get all the subnets ids by
$subnetIds = az network vnet subnet list -g test --vnet-name test --query [].{id:id} -o tsv
and save them into a var called subnetIds.
Then I used
az network vnet list-available-ips --ids $subnetIds
and the print was
[
{
ip1,
ip2,
ip3
}
{
ip1,
ip2,
ip3
}
{
ip1,
ip2,
ip3
}
]
the same object over and over again, but I have 3 different subnets with different numbers of available ips (3,4,1) .
To Reproduce
Just use
az network vnet list-available-ips --ids id1 id2
with two different subnets ids
Expected behavior
Showing me the available ips for each subnet I put on --ids
Environment summary
powershell
az cli version - 2.25.0