Microsoft.Network vpnGateways 2020-05-01

The vpnGateways resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.Network/vpnGateways resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.Network/vpnGateways@2020-05-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  properties: {
    bgpSettings: {
      asn: int
      bgpPeeringAddress: 'string'
      bgpPeeringAddresses: [
        {
          customBgpIpAddresses: [ 'string' ]
          ipconfigurationId: 'string'
        }
      ]
      peerWeight: int
    }
    connections: [
      {
        id: 'string'
        name: 'string'
        properties: {
          connectionBandwidth: int
          dpdTimeoutSeconds: int
          enableBgp: bool
          enableInternetSecurity: bool
          enableRateLimiting: bool
          ipsecPolicies: [
            {
              dhGroup: 'string'
              ikeEncryption: 'string'
              ikeIntegrity: 'string'
              ipsecEncryption: 'string'
              ipsecIntegrity: 'string'
              pfsGroup: 'string'
              saDataSizeKilobytes: int
              saLifeTimeSeconds: int
            }
          ]
          remoteVpnSite: {
            id: 'string'
          }
          routingConfiguration: {
            associatedRouteTable: {
              id: 'string'
            }
            propagatedRouteTables: {
              ids: [
                {
                  id: 'string'
                }
              ]
              labels: [ 'string' ]
            }
            vnetRoutes: {
              staticRoutes: [
                {
                  addressPrefixes: [ 'string' ]
                  name: 'string'
                  nextHopIpAddress: 'string'
                }
              ]
            }
          }
          routingWeight: int
          sharedKey: 'string'
          useLocalAzureIpAddress: bool
          usePolicyBasedTrafficSelectors: bool
          vpnConnectionProtocolType: 'string'
          vpnLinkConnections: [
            {
              id: 'string'
              name: 'string'
              properties: {
                connectionBandwidth: int
                enableBgp: bool
                enableRateLimiting: bool
                ipsecPolicies: [
                  {
                    dhGroup: 'string'
                    ikeEncryption: 'string'
                    ikeIntegrity: 'string'
                    ipsecEncryption: 'string'
                    ipsecIntegrity: 'string'
                    pfsGroup: 'string'
                    saDataSizeKilobytes: int
                    saLifeTimeSeconds: int
                  }
                ]
                routingWeight: int
                sharedKey: 'string'
                useLocalAzureIpAddress: bool
                usePolicyBasedTrafficSelectors: bool
                vpnConnectionProtocolType: 'string'
                vpnSiteLink: {
                  id: 'string'
                }
              }
            }
          ]
        }
      }
    ]
    virtualHub: {
      id: 'string'
    }
    vpnGatewayScaleUnit: int
  }
}

Property values

vpnGateways

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.Network/vpnGateways'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2020-05-01'
name The resource name string (required)
location Resource location. string
tags Resource tags. Dictionary of tag names and values. See Tags in templates
properties Parameters for VpnGateway. VpnGatewayProperties

VpnGatewayProperties

Name Description Value
bgpSettings BGP settings details. BgpSettings
connections List of all vpn connections to the gateway. VpnConnection[]
virtualHub Reference to another subresource. SubResource
vpnGatewayScaleUnit The scale unit for this vpn gateway. int

BgpSettings

Name Description Value
asn The BGP speaker's ASN. int
bgpPeeringAddress The BGP peering address and BGP identifier of this BGP speaker. string
bgpPeeringAddresses BGP peering address with IP configuration ID for virtual network gateway. IPConfigurationBgpPeeringAddress[]
peerWeight The weight added to routes learned from this BGP speaker. int

IPConfigurationBgpPeeringAddress

Name Description Value
customBgpIpAddresses The list of custom BGP peering addresses which belong to IP configuration. string[]
ipconfigurationId The ID of IP configuration which belongs to gateway. string

VpnConnection

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 Parameters for VpnConnection. VpnConnectionProperties

VpnConnectionProperties

Name Description Value
connectionBandwidth Expected bandwidth in MBPS. int
dpdTimeoutSeconds The dead peer detection timeout for a vpn connection in seconds. int
enableBgp EnableBgp flag. bool
enableInternetSecurity Enable internet security. bool
enableRateLimiting EnableBgp flag. bool
ipsecPolicies The IPSec Policies to be considered by this connection. IpsecPolicy[]
remoteVpnSite Reference to another subresource. SubResource
routingConfiguration Routing Configuration indicating the associated and propagated route tables for this connection. RoutingConfiguration
routingWeight Routing weight for vpn connection. int
sharedKey SharedKey for the vpn connection. string
useLocalAzureIpAddress Use local azure ip to initiate connection. bool
usePolicyBasedTrafficSelectors Enable policy-based traffic selectors. bool
vpnConnectionProtocolType Gateway connection protocol. 'IKEv1'
'IKEv2'
vpnLinkConnections List of all vpn site link connections to the gateway. VpnSiteLinkConnection[]

IpsecPolicy

Name Description Value
dhGroup The DH Groups used in IKE Phase 1 for initial SA. 'DHGroup1'
'DHGroup14'
'DHGroup2'
'DHGroup2048'
'DHGroup24'
'ECP256'
'ECP384'
'None'
ikeEncryption The IKE encryption algorithm (IKE phase 2). 'AES128'
'AES192'
'AES256'
'DES'
'DES3'
'GCMAES128'
'GCMAES256'
ikeIntegrity The IKE integrity algorithm (IKE phase 2). 'GCMAES128'
'GCMAES256'
'MD5'
'SHA1'
'SHA256'
'SHA384'
ipsecEncryption The IPSec encryption algorithm (IKE phase 1). 'AES128'
'AES192'
'AES256'
'DES'
'DES3'
'GCMAES128'
'GCMAES192'
'GCMAES256'
'None'
ipsecIntegrity The IPSec integrity algorithm (IKE phase 1). 'GCMAES128'
'GCMAES192'
'GCMAES256'
'MD5'
'SHA1'
'SHA256'
pfsGroup The Pfs Groups used in IKE Phase 2 for new child SA. 'ECP256'
'ECP384'
'None'
'PFS1'
'PFS14'
'PFS2'
'PFS2048'
'PFS24'
'PFSMM'
saDataSizeKilobytes The IPSec Security Association (also called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN tunnel. int (required)
saLifeTimeSeconds The IPSec Security Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. int (required)

SubResource

Name Description Value
id Resource ID. string

RoutingConfiguration

Name Description Value
associatedRouteTable Reference to another subresource. SubResource
propagatedRouteTables The list of RouteTables to advertise the routes to. PropagatedRouteTable
vnetRoutes List of routes that control routing from VirtualHub into a virtual network connection. VnetRoute

PropagatedRouteTable

Name Description Value
ids The list of resource ids of all the RouteTables. SubResource[]
labels The list of labels. string[]

VnetRoute

Name Description Value
staticRoutes List of all Static Routes. StaticRoute[]

StaticRoute

Name Description Value
addressPrefixes List of all address prefixes. string[]
name The name of the StaticRoute that is unique within a VnetRoute. string
nextHopIpAddress The ip address of the next hop. string

VpnSiteLinkConnection

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 Parameters for VpnConnection. VpnSiteLinkConnectionProperties

VpnSiteLinkConnectionProperties

Name Description Value
connectionBandwidth Expected bandwidth in MBPS. int
enableBgp EnableBgp flag. bool
enableRateLimiting EnableBgp flag. bool
ipsecPolicies The IPSec Policies to be considered by this connection. IpsecPolicy[]
routingWeight Routing weight for vpn connection. int
sharedKey SharedKey for the vpn connection. string
useLocalAzureIpAddress Use local azure ip to initiate connection. bool
usePolicyBasedTrafficSelectors Enable policy-based traffic selectors. bool
vpnConnectionProtocolType Gateway connection protocol. 'IKEv1'
'IKEv2'
vpnSiteLink Reference to another subresource. SubResource

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
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.