Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
- Latest
- 2025-01-01
- 2024-10-01
- 2024-07-01
- 2024-05-01
- 2024-03-01
- 2024-01-01
- 2023-11-01
- 2023-09-01
- 2023-06-01
- 2023-05-01
- 2023-04-01
- 2023-02-01
- 2022-11-01
- 2022-09-01
- 2022-07-01
- 2022-05-01
- 2022-01-01
- 2021-08-01
- 2021-05-01
- 2021-03-01
- 2021-02-01
- 2020-11-01
- 2020-08-01
- 2020-07-01
- 2020-06-01
- 2020-05-01
- 2020-04-01
- 2020-03-01
- 2019-12-01
- 2019-11-01
- 2019-09-01
- 2019-08-01
- 2019-07-01
- 2019-06-01
- 2019-04-01
- 2019-02-01
- 2018-12-01
- 2018-11-01
- 2018-10-01
- 2018-08-01
- 2018-07-01
- 2018-06-01
- 2018-04-01
Bicep resource definition
The virtualHubs resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Network/virtualHubs resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Network/virtualHubs@2023-09-01' = {
scope: resourceSymbolicName or scope
___location: 'string'
name: 'string'
properties: {
addressPrefix: 'string'
allowBranchToBranchTraffic: bool
azureFirewall: {
id: 'string'
}
expressRouteGateway: {
id: 'string'
}
hubRoutingPreference: 'string'
p2SVpnGateway: {
id: 'string'
}
preferredRoutingGateway: 'string'
routeTable: {
routes: [
{
addressPrefixes: [
'string'
]
nextHopIpAddress: 'string'
}
]
}
securityPartnerProvider: {
id: 'string'
}
securityProviderName: 'string'
sku: 'string'
virtualHubRouteTableV2s: [
{
id: 'string'
name: 'string'
properties: {
attachedConnections: [
'string'
]
routes: [
{
destinations: [
'string'
]
destinationType: 'string'
nextHops: [
'string'
]
nextHopType: 'string'
}
]
}
}
]
virtualRouterAsn: int
virtualRouterAutoScaleConfiguration: {
minCapacity: int
}
virtualRouterIps: [
'string'
]
virtualWan: {
id: 'string'
}
vpnGateway: {
id: 'string'
}
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Network/virtualHubs
| Name | Description | Value |
|---|---|---|
| ___location | Resource ___location. | string |
| name | The resource name | string (required) |
| properties | Properties of the virtual hub. | VirtualHubProperties |
| scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ResourceTags
| Name | Description | Value |
|---|
SubResource
| Name | Description | Value |
|---|---|---|
| id | Resource ID. | string |
VirtualHubProperties
| Name | Description | Value |
|---|---|---|
| addressPrefix | Address-prefix for this VirtualHub. | string |
| allowBranchToBranchTraffic | Flag to control transit for VirtualRouter hub. | bool |
| azureFirewall | The azureFirewall associated with this VirtualHub. | SubResource |
| expressRouteGateway | The expressRouteGateway associated with this VirtualHub. | SubResource |
| hubRoutingPreference | The hubRoutingPreference of this VirtualHub. | 'ASPath' 'ExpressRoute' 'VpnGateway' |
| p2SVpnGateway | The P2SVpnGateway associated with this VirtualHub. | SubResource |
| preferredRoutingGateway | The preferred gateway to route on-prem traffic | 'ExpressRoute' 'None' 'VpnGateway' |
| routeTable | The routeTable associated with this virtual hub. | VirtualHubRouteTable |
| securityPartnerProvider | The securityPartnerProvider associated with this VirtualHub. | SubResource |
| securityProviderName | The Security Provider name. | string |
| sku | The sku of this VirtualHub. | string |
| virtualHubRouteTableV2s | List of all virtual hub route table v2s associated with this VirtualHub. | VirtualHubRouteTableV2[] |
| virtualRouterAsn | VirtualRouter ASN. | int Constraints: Min value = 0 Max value = 4294967295 |
| virtualRouterAutoScaleConfiguration | The VirtualHub Router autoscale configuration. | VirtualRouterAutoScaleConfiguration |
| virtualRouterIps | VirtualRouter IPs. | string[] |
| virtualWan | The VirtualWAN to which the VirtualHub belongs. | SubResource |
| vpnGateway | The VpnGateway associated with this VirtualHub. | SubResource |
VirtualHubRoute
| Name | Description | Value |
|---|---|---|
| addressPrefixes | List of all addressPrefixes. | string[] |
| nextHopIpAddress | NextHop ip address. | string |
VirtualHubRouteTable
| Name | Description | Value |
|---|---|---|
| routes | List of all routes. | VirtualHubRoute[] |
VirtualHubRouteTableV2
| Name | Description | Value |
|---|---|---|
| id | Resource ID. | string |
| name | The name of the resource that is unique within a resource group. This name can be used to access the resource. | string |
| properties | Properties of the virtual hub route table v2. | VirtualHubRouteTableV2Properties |
VirtualHubRouteTableV2Properties
| Name | Description | Value |
|---|---|---|
| attachedConnections | List of all connections attached to this route table v2. | string[] |
| routes | List of all routes. | VirtualHubRouteV2[] |
VirtualHubRouteV2
| Name | Description | Value |
|---|---|---|
| destinations | List of all destinations. | string[] |
| destinationType | The type of destinations. | string |
| nextHops | NextHops ip address. | string[] |
| nextHopType | The type of next hops. | string |
VirtualRouterAutoScaleConfiguration
| Name | Description | Value |
|---|---|---|
| minCapacity | The minimum number of scale units for VirtualHub Router. | int Constraints: Min value = 0 |
Usage Examples
Azure Verified Modules
The following Azure Verified Modules can be used to deploy this resource type.
| Module | Description |
|---|---|
| Virtual Hub | AVM Resource Module for Virtual Hub |
Azure Quickstart Samples
The following Azure Quickstart templates contain Bicep samples for deploying this resource type.
| Bicep File | Description |
|---|---|
| Create a Route Server in a New Subnet | This template deploys a Route Server into a subnet named RouteServerSubnet. |
| Creates Virtual WAN resources | This template allows you to create virtual WAN resources including Virtual WAN, Virtual Hub, VPN Gateway, VPN Site and a VPN Connecton. |
| Secured virtual hubs | This template creates a secured virtual hub using Azure Firewall to secure your cloud network traffic destined to the Internet. |
ARM template resource definition
The virtualHubs resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Network/virtualHubs resource, add the following JSON to your template.
{
"type": "Microsoft.Network/virtualHubs",
"apiVersion": "2023-09-01",
"name": "string",
"___location": "string",
"properties": {
"addressPrefix": "string",
"allowBranchToBranchTraffic": "bool",
"azureFirewall": {
"id": "string"
},
"expressRouteGateway": {
"id": "string"
},
"hubRoutingPreference": "string",
"p2SVpnGateway": {
"id": "string"
},
"preferredRoutingGateway": "string",
"routeTable": {
"routes": [
{
"addressPrefixes": [ "string" ],
"nextHopIpAddress": "string"
}
]
},
"securityPartnerProvider": {
"id": "string"
},
"securityProviderName": "string",
"sku": "string",
"virtualHubRouteTableV2s": [
{
"id": "string",
"name": "string",
"properties": {
"attachedConnections": [ "string" ],
"routes": [
{
"destinations": [ "string" ],
"destinationType": "string",
"nextHops": [ "string" ],
"nextHopType": "string"
}
]
}
}
],
"virtualRouterAsn": "int",
"virtualRouterAutoScaleConfiguration": {
"minCapacity": "int"
},
"virtualRouterIps": [ "string" ],
"virtualWan": {
"id": "string"
},
"vpnGateway": {
"id": "string"
}
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Network/virtualHubs
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2023-09-01' |
| ___location | Resource ___location. | string |
| name | The resource name | string (required) |
| properties | Properties of the virtual hub. | VirtualHubProperties |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.Network/virtualHubs' |
ResourceTags
| Name | Description | Value |
|---|
SubResource
| Name | Description | Value |
|---|---|---|
| id | Resource ID. | string |
VirtualHubProperties
| Name | Description | Value |
|---|---|---|
| addressPrefix | Address-prefix for this VirtualHub. | string |
| allowBranchToBranchTraffic | Flag to control transit for VirtualRouter hub. | bool |
| azureFirewall | The azureFirewall associated with this VirtualHub. | SubResource |
| expressRouteGateway | The expressRouteGateway associated with this VirtualHub. | SubResource |
| hubRoutingPreference | The hubRoutingPreference of this VirtualHub. | 'ASPath' 'ExpressRoute' 'VpnGateway' |
| p2SVpnGateway | The P2SVpnGateway associated with this VirtualHub. | SubResource |
| preferredRoutingGateway | The preferred gateway to route on-prem traffic | 'ExpressRoute' 'None' 'VpnGateway' |
| routeTable | The routeTable associated with this virtual hub. | VirtualHubRouteTable |
| securityPartnerProvider | The securityPartnerProvider associated with this VirtualHub. | SubResource |
| securityProviderName | The Security Provider name. | string |
| sku | The sku of this VirtualHub. | string |
| virtualHubRouteTableV2s | List of all virtual hub route table v2s associated with this VirtualHub. | VirtualHubRouteTableV2[] |
| virtualRouterAsn | VirtualRouter ASN. | int Constraints: Min value = 0 Max value = 4294967295 |
| virtualRouterAutoScaleConfiguration | The VirtualHub Router autoscale configuration. | VirtualRouterAutoScaleConfiguration |
| virtualRouterIps | VirtualRouter IPs. | string[] |
| virtualWan | The VirtualWAN to which the VirtualHub belongs. | SubResource |
| vpnGateway | The VpnGateway associated with this VirtualHub. | SubResource |
VirtualHubRoute
| Name | Description | Value |
|---|---|---|
| addressPrefixes | List of all addressPrefixes. | string[] |
| nextHopIpAddress | NextHop ip address. | string |
VirtualHubRouteTable
| Name | Description | Value |
|---|---|---|
| routes | List of all routes. | VirtualHubRoute[] |
VirtualHubRouteTableV2
| Name | Description | Value |
|---|---|---|
| id | Resource ID. | string |
| name | The name of the resource that is unique within a resource group. This name can be used to access the resource. | string |
| properties | Properties of the virtual hub route table v2. | VirtualHubRouteTableV2Properties |
VirtualHubRouteTableV2Properties
| Name | Description | Value |
|---|---|---|
| attachedConnections | List of all connections attached to this route table v2. | string[] |
| routes | List of all routes. | VirtualHubRouteV2[] |
VirtualHubRouteV2
| Name | Description | Value |
|---|---|---|
| destinations | List of all destinations. | string[] |
| destinationType | The type of destinations. | string |
| nextHops | NextHops ip address. | string[] |
| nextHopType | The type of next hops. | string |
VirtualRouterAutoScaleConfiguration
| Name | Description | Value |
|---|---|---|
| minCapacity | The minimum number of scale units for VirtualHub Router. | int Constraints: Min value = 0 |
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Azure Route Server in BGP peering with Quagga |
This template deploys a Router Server and Ubuntu VM with Quagga. Two external BGP sessions are established between the Router Server and Quagga. Installation and configuration of Quagga is executed by Azure custom script extension for linux |
| Azure Virtual WAN (vWAN) Multi-Hub Deployment |
This template allows you to create an Azure Virtual WAN (vWAN) multi-hub deployment including all gateways and VNET connections. |
| Azure vWAN Multi-Hub Deployment with Custom Routing Tables |
This template allows you to create an Azure Virtual WAN (vWAN) multi-hub deployment, including all gateways and VNET connections, and demonstrate the usage of Route Tables for custom routing. |
| Create a Route Server in a New Subnet |
This template deploys a Route Server into a subnet named RouteServerSubnet. |
| Creates Virtual WAN resources |
This template allows you to create virtual WAN resources including Virtual WAN, Virtual Hub, VPN Gateway, VPN Site and a VPN Connecton. |
| Secured virtual hubs |
This template creates a secured virtual hub using Azure Firewall to secure your cloud network traffic destined to the Internet. |
| vWAN P2S deployment with multi address pool and user groups |
This template deploys Azure Virtual WAN (vWAN) with a P2S configured with multiple address pool and user groups |
Terraform (AzAPI provider) resource definition
The virtualHubs resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.Network/virtualHubs resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Network/virtualHubs@2023-09-01"
name = "string"
parent_id = "string"
___location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
addressPrefix = "string"
allowBranchToBranchTraffic = bool
azureFirewall = {
id = "string"
}
expressRouteGateway = {
id = "string"
}
hubRoutingPreference = "string"
p2SVpnGateway = {
id = "string"
}
preferredRoutingGateway = "string"
routeTable = {
routes = [
{
addressPrefixes = [
"string"
]
nextHopIpAddress = "string"
}
]
}
securityPartnerProvider = {
id = "string"
}
securityProviderName = "string"
sku = "string"
virtualHubRouteTableV2s = [
{
id = "string"
name = "string"
properties = {
attachedConnections = [
"string"
]
routes = [
{
destinations = [
"string"
]
destinationType = "string"
nextHops = [
"string"
]
nextHopType = "string"
}
]
}
}
]
virtualRouterAsn = int
virtualRouterAutoScaleConfiguration = {
minCapacity = int
}
virtualRouterIps = [
"string"
]
virtualWan = {
id = "string"
}
vpnGateway = {
id = "string"
}
}
}
}
Property Values
Microsoft.Network/virtualHubs
| Name | Description | Value |
|---|---|---|
| ___location | Resource ___location. | string |
| name | The resource name | string (required) |
| parent_id | The ID of the resource to apply this extension resource to. | string (required) |
| properties | Properties of the virtual hub. | VirtualHubProperties |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.Network/virtualHubs@2023-09-01" |
ResourceTags
| Name | Description | Value |
|---|
SubResource
| Name | Description | Value |
|---|---|---|
| id | Resource ID. | string |
VirtualHubProperties
| Name | Description | Value |
|---|---|---|
| addressPrefix | Address-prefix for this VirtualHub. | string |
| allowBranchToBranchTraffic | Flag to control transit for VirtualRouter hub. | bool |
| azureFirewall | The azureFirewall associated with this VirtualHub. | SubResource |
| expressRouteGateway | The expressRouteGateway associated with this VirtualHub. | SubResource |
| hubRoutingPreference | The hubRoutingPreference of this VirtualHub. | 'ASPath' 'ExpressRoute' 'VpnGateway' |
| p2SVpnGateway | The P2SVpnGateway associated with this VirtualHub. | SubResource |
| preferredRoutingGateway | The preferred gateway to route on-prem traffic | 'ExpressRoute' 'None' 'VpnGateway' |
| routeTable | The routeTable associated with this virtual hub. | VirtualHubRouteTable |
| securityPartnerProvider | The securityPartnerProvider associated with this VirtualHub. | SubResource |
| securityProviderName | The Security Provider name. | string |
| sku | The sku of this VirtualHub. | string |
| virtualHubRouteTableV2s | List of all virtual hub route table v2s associated with this VirtualHub. | VirtualHubRouteTableV2[] |
| virtualRouterAsn | VirtualRouter ASN. | int Constraints: Min value = 0 Max value = 4294967295 |
| virtualRouterAutoScaleConfiguration | The VirtualHub Router autoscale configuration. | VirtualRouterAutoScaleConfiguration |
| virtualRouterIps | VirtualRouter IPs. | string[] |
| virtualWan | The VirtualWAN to which the VirtualHub belongs. | SubResource |
| vpnGateway | The VpnGateway associated with this VirtualHub. | SubResource |
VirtualHubRoute
| Name | Description | Value |
|---|---|---|
| addressPrefixes | List of all addressPrefixes. | string[] |
| nextHopIpAddress | NextHop ip address. | string |
VirtualHubRouteTable
| Name | Description | Value |
|---|---|---|
| routes | List of all routes. | VirtualHubRoute[] |
VirtualHubRouteTableV2
| Name | Description | Value |
|---|---|---|
| id | Resource ID. | string |
| name | The name of the resource that is unique within a resource group. This name can be used to access the resource. | string |
| properties | Properties of the virtual hub route table v2. | VirtualHubRouteTableV2Properties |
VirtualHubRouteTableV2Properties
| Name | Description | Value |
|---|---|---|
| attachedConnections | List of all connections attached to this route table v2. | string[] |
| routes | List of all routes. | VirtualHubRouteV2[] |
VirtualHubRouteV2
| Name | Description | Value |
|---|---|---|
| destinations | List of all destinations. | string[] |
| destinationType | The type of destinations. | string |
| nextHops | NextHops ip address. | string[] |
| nextHopType | The type of next hops. | string |
VirtualRouterAutoScaleConfiguration
| Name | Description | Value |
|---|---|---|
| minCapacity | The minimum number of scale units for VirtualHub Router. | int Constraints: Min value = 0 |
Usage Examples
Terraform Samples
A basic example of deploying Virtual Hub within a Virtual WAN.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "___location" {
type = string
default = "westeurope"
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
___location = var.___location
}
resource "azapi_resource" "virtualWan" {
type = "Microsoft.Network/virtualWans@2022-07-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
___location = var.___location
body = {
properties = {
allowBranchToBranchTraffic = true
disableVpnEncryption = false
office365LocalBreakoutCategory = "None"
type = "Standard"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
resource "azapi_resource" "virtualHub" {
type = "Microsoft.Network/virtualHubs@2022-07-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
___location = var.___location
body = {
properties = {
addressPrefix = "10.0.0.0/24"
hubRoutingPreference = "ExpressRoute"
virtualRouterAutoScaleConfiguration = {
minCapacity = 2
}
virtualWan = {
id = azapi_resource.virtualWan.id
}
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}