Microsoft.Network virtualHubs 2020-04-01

Template format

To create a Microsoft.Network/virtualHubs resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.Network/virtualHubs",
  "apiVersion": "2020-04-01",
  "location": "string",
  "tags": {},
  "properties": {
    "virtualWan": {
      "id": "string"
    },
    "vpnGateway": {
      "id": "string"
    },
    "p2SVpnGateway": {
      "id": "string"
    },
    "expressRouteGateway": {
      "id": "string"
    },
    "azureFirewall": {
      "id": "string"
    },
    "securityPartnerProvider": {
      "id": "string"
    },
    "virtualNetworkConnections": [
      {
        "id": "string",
        "properties": {
          "remoteVirtualNetwork": {
            "id": "string"
          },
          "allowHubToRemoteVnetTransit": "boolean",
          "allowRemoteVnetToUseHubVnetGateways": "boolean",
          "enableInternetSecurity": "boolean",
          "routingConfiguration": {
            "associatedRouteTable": {
              "id": "string"
            },
            "propagatedRouteTables": {
              "labels": [
                "string"
              ],
              "ids": [
                {
                  "id": "string"
                }
              ]
            },
            "vnetRoutes": {
              "staticRoutes": [
                {
                  "name": "string",
                  "addressPrefixes": [
                    "string"
                  ],
                  "nextHopIpAddress": "string"
                }
              ]
            }
          }
        },
        "name": "string"
      }
    ],
    "addressPrefix": "string",
    "routeTable": {
      "routes": [
        {
          "addressPrefixes": [
            "string"
          ],
          "nextHopIpAddress": "string"
        }
      ]
    },
    "securityProviderName": "string",
    "virtualHubRouteTableV2s": [
      {
        "id": "string",
        "properties": {
          "routes": [
            {
              "destinationType": "string",
              "destinations": [
                "string"
              ],
              "nextHopType": "string",
              "nextHops": [
                "string"
              ]
            }
          ],
          "attachedConnections": [
            "string"
          ]
        },
        "name": "string"
      }
    ],
    "sku": "string"
  },
  "resources": []
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Network/virtualHubs object

Note

In Bicep, type and apiVersion are specified in the first line of the resource declaration. Use the format <type>@<apiVersion>. Don't set those properties in the resource body.

Name Type Required Value
name string Yes The name of the VirtualHub.
type enum Yes For JSON - Microsoft.Network/virtualHubs
apiVersion enum Yes For JSON - 2020-04-01
location string Yes Resource location.
tags object No Resource tags.
properties object Yes Properties of the virtual hub. - VirtualHubProperties object
resources array No hubRouteTables routeTables

VirtualHubProperties object

Name Type Required Value
virtualWan object No The VirtualWAN to which the VirtualHub belongs. - SubResource object
vpnGateway object No The VpnGateway associated with this VirtualHub. - SubResource object
p2SVpnGateway object No The P2SVpnGateway associated with this VirtualHub. - SubResource object
expressRouteGateway object No The expressRouteGateway associated with this VirtualHub. - SubResource object
azureFirewall object No The azureFirewall associated with this VirtualHub. - SubResource object
securityPartnerProvider object No The securityPartnerProvider associated with this VirtualHub. - SubResource object
virtualNetworkConnections array No List of all vnet connections with this VirtualHub. - HubVirtualNetworkConnection object
addressPrefix string No Address-prefix for this VirtualHub.
routeTable object No The routeTable associated with this virtual hub. - VirtualHubRouteTable object
securityProviderName string No The Security Provider name.
virtualHubRouteTableV2s array No List of all virtual hub route table v2s associated with this VirtualHub. - VirtualHubRouteTableV2 object
sku string No The sku of this VirtualHub.

SubResource object

Name Type Required Value
id string No Resource ID.

HubVirtualNetworkConnection object

Name Type Required Value
id string No Resource ID.
properties object No Properties of the hub virtual network connection. - HubVirtualNetworkConnectionProperties object
name string No The name of the resource that is unique within a resource group. This name can be used to access the resource.

VirtualHubRouteTable object

Name Type Required Value
routes array No List of all routes. - VirtualHubRoute object

VirtualHubRouteTableV2 object

Name Type Required Value
id string No Resource ID.
properties object No Properties of the virtual hub route table v2. - VirtualHubRouteTableV2Properties object
name string No The name of the resource that is unique within a resource group. This name can be used to access the resource.

HubVirtualNetworkConnectionProperties object

Name Type Required Value
remoteVirtualNetwork object No Reference to the remote virtual network. - SubResource object
allowHubToRemoteVnetTransit boolean No VirtualHub to RemoteVnet transit to enabled or not.
allowRemoteVnetToUseHubVnetGateways boolean No Allow RemoteVnet to use Virtual Hub's gateways.
enableInternetSecurity boolean No Enable internet security.
routingConfiguration object No The Routing Configuration indicating the associated and propagated route tables on this connection. - RoutingConfiguration object

VirtualHubRoute object

Name Type Required Value
addressPrefixes array No List of all addressPrefixes. - string
nextHopIpAddress string No NextHop ip address.

VirtualHubRouteTableV2Properties object

Name Type Required Value
routes array No List of all routes. - VirtualHubRouteV2 object
attachedConnections array No List of all connections attached to this route table v2. - string

RoutingConfiguration object

Name Type Required Value
associatedRouteTable object No The resource id RouteTable associated with this RoutingConfiguration. - SubResource object
propagatedRouteTables object No The list of RouteTables to advertise the routes to. - PropagatedRouteTable object
vnetRoutes object No List of routes that control routing from VirtualHub into a virtual network connection. - VnetRoute object

VirtualHubRouteV2 object

Name Type Required Value
destinationType string No The type of destinations.
destinations array No List of all destinations. - string
nextHopType string No The type of next hops.
nextHops array No NextHops ip address. - string

PropagatedRouteTable object

Name Type Required Value
labels array No The list of labels. - string
ids array No The list of resource ids of all the RouteTables. - SubResource object

VnetRoute object

Name Type Required Value
staticRoutes array No List of all Static Routes. - StaticRoute object

StaticRoute object

Name Type Required Value
name string No The name of the StaticRoute that is unique within a VnetRoute.
addressPrefixes array No List of all address prefixes. - string
nextHopIpAddress string No The ip address of the next hop.

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Secured virtual hubs

Deploy to Azure
This template creates a secured virtual hub using Azure Firewall to secure your cloud network traffic destined to the Internet.
Create a Route Server in a New Subnet

Deploy to Azure
This template deploys a Route Server into a subnet named routeserversubnet.
Azure Route Server in BGP peering with Quagga

Deploy to Azure
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
Creates Virtual wan resources

Deploy to Azure
This template allows you to create virtual wan resources including virtual wan, virtual hub, vpn gateway, vpnsite and a vpn connecton.
Azure Virtual WAN (vWAN) Multi-Hub Deployment

Deploy to Azure
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

Deploy to Azure
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.