Networking
Virtual WAN hub
Connects sites and virtual networks through a regional routing hub in Azure Virtual WAN.
Naming rules
- Abbreviation
- Length
- Up to 80 (module guidance)
- Allowed characters
- See Microsoft’s resource reference.
- Uniqueness scope
- See resource reference
Azure Verified Modules naming utility v0.3.0 · AVM naming key virtual_hub_virtual_wan_hub
Code examples
Adapt the examples to your environment and supply referenced resources and variables.
Terraform
Terraform documentationhcl
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
version = "~> 2.0"
}
}
}
variable "hubAddressPrefix" {
type = string
}
variable "location" {
type = string
}
variable "name" {
type = string
}
variable "virtualWanId" {
type = string
}
variable "parent_id" {
description = "Full Azure resource ID of the parent resource or resource group."
type = string
}
resource "azapi_resource" "example" {
type = "Microsoft.Network/virtualHubs@2026-05-01"
name = var.name
parent_id = var.parent_id
location = var.location
body = {
properties = {
virtualWan = {
id = var.virtualWanId
}
addressPrefix = var.hubAddressPrefix
}
}
}
Bicep
Bicep documentationbicep
param hubAddressPrefix string
param location string
param name string
param virtualWanId string
resource example 'Microsoft.Network/virtualHubs@2026-05-01' = {
name: name
location: location
properties: {
virtualWan: {
id: virtualWanId
}
addressPrefix: hubAddressPrefix
}
}
ARM template
ARM template documentationjson
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"hubAddressPrefix": {
"type": "string"
},
"location": {
"type": "string"
},
"name": {
"type": "string"
},
"virtualWanId": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.Network/virtualHubs",
"apiVersion": "2026-05-01",
"name": "[parameters('name')]",
"location": "[parameters('location')]",
"properties": {
"virtualWan": {
"id": "[parameters('virtualWanId')]"
},
"addressPrefix": "[parameters('hubAddressPrefix')]"
}
}
]
}