I know that one way to get the VNet, is by using awk on the the id of a subnet. But what if I want to get the vnet of a subnet by using the subnet id, with az cli?
I guess I can use the az network vnet list command but I cannot figure out the proper filter that will let me search by subnets.[].id.
To get the VNet name from Subnet ID via Azure CLI, you can make use of below command:
Response: