vnet

Virtual Network

NetworkingAzure
General

General information about the service.

Description

Fundamental building block for private networks in Azure.

Namespace and Entity

Microsoft.Network/virtualNetworks

Chat

Powered by AI

Talk to this service to learn more about it.

Suggested questions:

Naming

The conventions, rules, and restrictions for naming this service.

Naming Convention

vnet-

Length

2-64

Valid Characters

Alphanumerics, hyphens, underscores.

Scope

resource group

Code

Deploy your infrastructure as code using your preferred tooling.

Official DocumentationTerraform
terraform
1resource "azurerm_virtual_network" "main" {
2 name = "vnet-${var.project}-${var.environment}-${var.location_short}"
3 location = azurerm_resource_group.main.location
4 resource_group_name = azurerm_resource_group.main.name
5 address_space = ["10.0.0.0/16"]
6
7 dns_servers = var.dns_servers
8
9 tags = var.tags
10}
11
12resource "azurerm_subnet" "default" {
13 name = "snet-default"
14 resource_group_name = azurerm_resource_group.main.name
15 virtual_network_name = azurerm_virtual_network.main.name
16 address_prefixes = ["10.0.1.0/24"]
17}
Utilities

Utilities to support app deployment or configuration.