title | titleSuffix | description | services | author | ms.service | ms.topic | ms.date | ms.author | ms.custom |
---|---|---|---|---|---|---|---|---|---|
Quickstart: Create a virtual network using a Resource Manager template |
Azure Virtual Network |
Learn how to use a Resource Manager template to create an Azure virtual network. |
virtual-network |
mbender-ms |
virtual-network |
quickstart |
06/09/2021 |
mbender |
devx-track-azurepowershell, mode-arm |
In this quickstart, you learn how to create a virtual network with two subnets using the Azure Resource Manager template. A virtual network is the fundamental building block for your private network in Azure. It enables Azure resources, like VMs, to securely communicate with each other and with the internet.
[!INCLUDE About Azure Resource Manager]
You can also complete this quickstart using the Azure portal, Azure PowerShell, or Azure CLI.
If you don't have an Azure subscription, create a free account before you begin.
The template used in this quickstart is from Azure Quickstart templates
:::code language="json" source="~/quickstart-templates/quickstarts/microsoft.network/vnet-two-subnets/azuredeploy.json" :::
The following Azure resources have been defined in the template:
- Microsoft.Network/virtualNetworks: create an Azure virtual network.
- Microsoft.Network/virtualNetworks/subnets - create a subnet.
Deploy Resource Manager template to Azure:
-
Select Deploy to Azure to sign in to Azure and open the template. The template creates a virtual network with two subnets.
-
In the portal, on the Create a Virtual Network with two Subnets page, type or select the following values:
- Resource group: Select Create new, type CreateVNetQS-rg for the resource group name, and select OK.
- Virtual Network Name: Type a name for the new virtual network.
-
Select Review + create, and then select Create.
-
When deployment completes, click on Go to resource button to review the resources deployed.
Explore the resources that were created with the virtual network by browsing the settings blades for VNet1.
-
On the Overview tab, you will see the defined address space of 10.0.0.0/16.
-
On the Subnets tab, you will see the deployed subnets of Subnet1 and Subnet2 with the appropriate values from the template.
To learn about the JSON syntax and properties for a virtual network in a template, see Microsoft.Network/virtualNetworks.
When you no longer need the resources that you created with the virtual network, delete the resource group. This removes the virtual network and all the related resources.
To delete the resource group, call the Remove-AzResourceGroup
cmdlet:
Remove-AzResourceGroup -Name <your resource group name>
In this quickstart, you deployed an Azure virtual network with two subnets. To learn more about Azure virtual networks, continue to the tutorial for virtual networks.
[!div class="nextstepaction"] Filter network traffic