Azure Virtual Networks

Introduction to Azure Virtual Networks

Azure Virtual Network (VNet) is the fundamental building block for private networking in Azure. It enables many types of Azure resources, such as Azure Virtual Machines (VM), to securely communicate with each other, the internet, and on-premises networks.

Key Features

Typical Use Cases

ScenarioBenefit
Multi‑tier applicationIsolate web, app, and database tiers in separate subnets.
Hybrid connectivityConnect on‑premises data centers via VPN or ExpressRoute.
Secure micro‑servicesApply network policies per service using NSGs.

Sample ARM Template

JSON
Bicep
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "resources": [
    {
      "type": "Microsoft.Network/virtualNetworks",
      "apiVersion": "2022-07-01",
      "name": "myVNet",
      "location": "[resourceGroup().location]",
      "properties": {
        "addressSpace": {
          "addressPrefixes": ["10.0.0.0/16"]
        },
        "subnets": [
          {
            "name": "frontend",
            "properties": { "addressPrefix": "10.0.1.0/24" }
          },
          {
            "name": "backend",
            "properties": { "addressPrefix": "10.0.2.0/24" }
          }
        ]
      }
    }
  ]
}