CmdID / az / az network / az network vnet / az network vnet subnet
az network vnet subnet create
Create a subnet and associate an existing NSG and route table. Azure CLI reference
16 options Its page in the Azure CLI reference
Options
--address-prefixThe address prefix for the subnet.--address-prefixesSpace-separated list of address prefixes in CIDR format.--default-outbound-access, --default-outboundSet this property to false to disable default outbound connectivity for all VMs in the subnet.--delegated-servicesSpace-separated list of services to whom the subnet should be delegated, e.g., Microsoft.Sql/servers.--endpointsAn array of service endpoints.--ipam-pool-prefix-allocations, --ipam-allocationsA list of IPAM Pools for allocating IP address prefixes.--name, -nThe subnet name.--nat-gatewayName or ID of a NAT gateway to attach.--network-security-group, --nsgName or ID of a network security group (NSG).--policiesAn array of service endpoint policies.--private-endpoint-network-policies, --ple-network-policiesManage network policies for private endpoint.--private-link-service-network-policies, --pls-network-policiesManage network policy for private link service.--route-tableName or ID of a route table to associate with the subnet.--service-endpointsSpace-separated list of services allowed private access to this subnet.--sharing-scopeSet this property to Tenant to allow sharing subnet with other subscriptions in your AAD tenant.--vnet-nameThe virtual network (VNet) name.