Create a subnet with the CLI
You can use the CLI to create subnets, as shown in this example.
az network vnet subnet create \ --resource-group my-cdp-resource-group \ --vnet-name my-cdp-vnet \ --name my-cml-subnet-1 \ --address-prefix 10.0.10.0/25 \ --service-endpoints Microsoft.Sql
This example creates a subnet for the NetApp Files volume:
az network vnet subnet create \ --resource-group my-cdp-resource-group \ --vnet-name my-cdp-vnet \ --name my-anf-subnet \ --address-prefix 10.0.10.0/25 \ --delegations Microsoft.NetApp/volumes
The --delegations
and --service-endpoints
flags can also be
applied to an existing subnet by using the az network vnet subnet update
command.