Share via


Microsoft.Network vpnGateways 2022-01-01

Bicep 資源定義

vpnGateways 資源類型可以使用目標作業進行部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.Network/vpnGateways 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.Network/vpnGateways@2022-01-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'
          trafficSelectorPolicies: [
            {
              localAddressRanges: [
                'string'
              ]
              remoteAddressRanges: [
                'string'
              ]
            }
          ]
          useLocalAzureIpAddress: bool
          usePolicyBasedTrafficSelectors: bool
          vpnConnectionProtocolType: 'string'
          vpnLinkConnections: [
            {
              id: 'string'
              name: 'string'
              properties: {
                connectionBandwidth: int
                egressNatRules: [
                  {
                    id: 'string'
                  }
                ]
                enableBgp: bool
                enableRateLimiting: bool
                ingressNatRules: [
                  {
                    id: 'string'
                  }
                ]
                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'
                vpnGatewayCustomBgpAddresses: [
                  {
                    customBgpIpAddress: 'string'
                    ipConfigurationId: 'string'
                  }
                ]
                vpnLinkConnectionMode: 'string'
                vpnSiteLink: {
                  id: 'string'
                }
              }
            }
          ]
        }
      }
    ]
    enableBgpRouteTranslationForNat: bool
    isRoutingPreferenceInternet: bool
    natRules: [
      {
        id: 'string'
        name: 'string'
        properties: {
          externalMappings: [
            {
              addressSpace: 'string'
              portRange: 'string'
            }
          ]
          internalMappings: [
            {
              addressSpace: 'string'
              portRange: 'string'
            }
          ]
          ipConfigurationId: 'string'
          mode: 'string'
          type: 'string'
        }
      }
    ]
    virtualHub: {
      id: 'string'
    }
    vpnGatewayScaleUnit: int
  }
}

屬性值

vpnGateways

名稱 描述
NAME 資源名稱 需要字串 ()

字元限制:1-80

合法字元:
英數字元、底線、句號和連字號。

以英數字元開頭。 以英數字元或底線結尾。
location 資源位置。 字串
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標籤
properties VPN 閘道的屬性。 VpnGatewayProperties

VpnGatewayProperties

名稱 描述
bgpSettings 局域網路閘道的 BGP 喇叭設定。 BgpSettings
connections 閘道的所有 VPN 連線清單。 VpnConnection[]
enableBgpRouteTranslationForNat 在此 VpnGateway 上啟用 NAT 的 BGP 路由轉譯。 bool
isRoutingPreferenceInternet 為 VpnGateway 的公用 IP 介面啟用路由喜好設定屬性。 bool
natRules 與閘道相關聯的所有 nat 規則清單。 VpnGatewayNatRule[]
virtualHub 網關所屬的 VirtualHub。 SubResource
vpnGatewayScaleUnit 此 VPN 閘道的縮放單位。 int

BgpSettings

名稱 描述
asn BGP 喇叭的 ASN。 int

約束:
最小值 = 0
最大值 = 4294967295
bgpPeeringAddress 此 BGP 說話者的 BGP 對等互連位址和 BGP 識別碼。 字串
bgpPeeringAddresses 具有虛擬網路閘道IP組態標識碼的 BGP 對等互連位址。 IPConfigurationBgpPeeringAddress[]
peerWeight 新增至從此 BGP 喇叭學習路由的權數。 int

IPConfigurationBgpPeeringAddress

名稱 描述
customBgpIpAddresses 屬於IP組態的自訂BGP對等互連位址清單。 string[]
ipconfigurationId 屬於閘道的IP組態標識碼。 字串

VpnConnection

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties VPN 連線的屬性。 VpnConnectionProperties

VpnConnectionProperties

名稱 描述
connectionBandwidth MBPS 的預期頻寬。 int
dpdTimeoutSeconds VPN 連線的 DPD 逾時,以秒為單位。 int
enableBgp EnableBgp 旗標。 bool
enableInternetSecurity 啟用因特網安全性。 bool
enableRateLimiting EnableBgp 旗標。 bool
ipsecPolicies 此連線要考慮的IPSec原則。 IpsecPolicy[]
remoteVpnSite 已連線 VPN 網站的識別碼。 SubResource
routingConfiguration 路由組態,指出此聯機上相關聯的和傳播的路由表。 RoutingConfiguration
routingWeight VPN 連線的路由權數。 int
sharedKey Vpn 連線的 SharedKey。 字串
trafficSelectorPolicies 此連線要考慮的流量選取器原則。 TrafficSelectorPolicy[]
useLocalAzureIpAddress 使用本機 Azure IP 起始連線。 bool
usePolicyBasedTrafficSelectors 啟用以原則為基礎的流量選取器。 bool
vpnConnectionProtocolType 用於此連線的連線通訊協定。 'IKEv1'
'IKEv2'
vpnLinkConnections 閘道的所有 VPN 網站連結連線清單。 VpnSiteLinkConnection[]

IpsecPolicy

名稱 描述
dhGroup IKE 階段 1 中用於初始 SA 的 DH 群組。 'DHGroup1'
'DHGroup14'
'DHGroup2'
'DHGroup2048'
'DHGroup24'
'ECP256'
'ECP384'
必要 『None』 ()
ikeEncryption IKE 加密演算法 (IKE 階段 2) 。 'AES128'
'AES192'
'AES256'
'DES'
'DES3'
'GCMAES128'
需要 『GCMAES256』 ()
ikeIntegrity IKE 完整性演算法 (IKE 階段 2) 。 'GCMAES128'
'GCMAES256'
'MD5'
'SHA1'
'SHA256'
需要 『SHA384』 ()
ipsecEncryption IPSec 加密演算法 (IKE 階段 1) 。 'AES128'
'AES192'
'AES256'
'DES'
'DES3'
'GCMAES128'
'GCMAES192'
'GCMAES256'
必要) ('None'
ipsecIntegrity IPSec 完整性演算法 (IKE 階段 1) 。 'GCMAES128'
'GCMAES192'
'GCMAES256'
'MD5'
'SHA1'
必要) 'SHA256' (
pfsGroup IKE 階段 2 中用於新子 SA 的 Pfs 群組。 'ECP256'
'ECP384'
'None'
'PFS1'
'PFS14'
'PFS2'
'PFS2048'
'PFS24'
需要 『PFSMM』 ()
saDataSizeKilobytes IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) KB 的承載大小,供站對站 VPN 通道使用。 int (必要)
saLifeTimeSeconds IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) 存留期,以秒為單位,讓站對站 VPN 通道。 int (必要)

SubResource

名稱 描述
id 資源識別碼。 字串

RoutingConfiguration

名稱 描述
associatedRouteTable 與此 RoutingConfiguration 相關聯的資源標識碼 RouteTable。 SubResource
propagatedRouteTables 要公告路由的 RouteTable 列表。 PropagatedRouteTable
vnetRoutes 控制從 VirtualHub 到虛擬網路連線之路由的路由清單。 VnetRoute

PropagatedRouteTable

名稱 描述
ids 所有 RouteTable 的資源標識符清單。 SubResource[]
標籤 標籤清單。 string[]

VnetRoute

名稱 描述
staticRoutes 所有靜態路由的清單。 StaticRoute[]

StaticRoute

名稱 描述
addressPrefixes 所有位址前置詞的清單。 string[]
NAME VnetRoute 內唯一的 StaticRoute 名稱。 字串
nextHopIpAddress 下一個躍點的IP位址。 字串

TrafficSelectorPolicy

名稱 描述
localAddressRanges CIDR 格式的本機位址空間集合。 string[] (必要)
remoteAddressRanges CIDR 格式的遠端位址空間集合。 string[] (必要)

VpnSiteLinkConnection

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties VPN 網站連結連線的屬性。 VpnSiteLinkConnectionProperties

VpnSiteLinkConnectionProperties

名稱 描述
connectionBandwidth MBPS 的預期頻寬。 int
egressNatRules 輸出 NatRules 的清單。 SubResource[]
enableBgp EnableBgp 旗標。 bool
enableRateLimiting EnableBgp 旗標。 bool
ingressNatRules 輸入 NatRules 的清單。 SubResource[]
ipsecPolicies 此連線要考慮的IPSec原則。 IpsecPolicy[]
routingWeight VPN 連線的路由權數。 int
sharedKey VPN 連線的 SharedKey。 字串
useLocalAzureIpAddress 使用本機 Azure IP 起始連線。 bool
usePolicyBasedTrafficSelectors 啟用以原則為基礎的流量選取器。 bool
vpnConnectionProtocolType 用於此連線的連線通訊協定。 'IKEv1'
'IKEv2'
vpnGatewayCustomBgpAddresses vpnGatewayCustomBgpAddresses 使用此聯機。 GatewayCustomBgpIpAddressIpConfiguration[]
vpnLinkConnectionMode Vpn 連結連線模式。 'Default'
'InitiatorOnly'
'ResponderOnly'
vpnSiteLink 線上的 VPN 網站鏈接識別碼。 SubResource

GatewayCustomBgpIpAddressIpConfiguration

名稱 描述
customBgpIpAddress 屬於 IpconfigurationId 的自定義 BgpPeeringAddress。 字串 (必要)
ipConfigurationId 屬於閘道之 ipconfiguration 的 IpconfigurationId。 字串 (必要)

VpnGatewayNatRule

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties VpnGateway NAT 規則的屬性。 VpnGatewayNatRuleProperties

VpnGatewayNatRuleProperties

名稱 描述
externalMappings NAT 的私人IP位址外部對應。 VpnNatRuleMapping[]
internalMappings NAT 的私人IP位址內部對應。 VpnNatRuleMapping[]
ipConfigurationId 此 NAT 規則適用的IP組態標識碼。 字串
mode VPN NAT 的來源 NAT 方向。 'EgressSnat'
'IngressSnat'
類型 VPN NAT 的 NAT 規則類型。 'Dynamic'
'Static'

VpnNatRuleMapping

名稱 描述
addressSpace Vpn NatRule 對應的地址空間。 字串
portRange Vpn NatRule 對應的埠範圍。 字串

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
建立 Virtual WAN 資源

部署至 Azure
此範本可讓您建立虛擬 WAN 資源,包括 Virtual WAN、虛擬中樞、VPN 閘道、VPN 網站和 VPN Connecton。
Azure Virtual WAN 路由意圖和原則

部署至 Azure
此範本會布建 Azure Virtual WAN,並啟用路由意圖和原則功能的兩個中樞。
Azure Virtual WAN (vWAN) 多中樞部署

部署至 Azure
此範本可讓您建立 Azure Virtual WAN (vWAN) 多中樞部署,包括所有閘道和 VNET 連線。
Azure vWAN 多中樞部署與自定義路由表

部署至 Azure
此範本可讓您建立 Azure Virtual WAN (vWAN) 多中樞部署,包括所有網關和 VNET 連線,並示範路由表用於自定義路由的使用方式。

ARM 範本資源定義

vpnGateways 資源類型可以使用目標作業進行部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.Network/vpnGateways 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.Network/vpnGateways",
  "apiVersion": "2022-01-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",
          "trafficSelectorPolicies": [
            {
              "localAddressRanges": [ "string" ],
              "remoteAddressRanges": [ "string" ]
            }
          ],
          "useLocalAzureIpAddress": "bool",
          "usePolicyBasedTrafficSelectors": "bool",
          "vpnConnectionProtocolType": "string",
          "vpnLinkConnections": [
            {
              "id": "string",
              "name": "string",
              "properties": {
                "connectionBandwidth": "int",
                "egressNatRules": [
                  {
                    "id": "string"
                  }
                ],
                "enableBgp": "bool",
                "enableRateLimiting": "bool",
                "ingressNatRules": [
                  {
                    "id": "string"
                  }
                ],
                "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",
                "vpnGatewayCustomBgpAddresses": [
                  {
                    "customBgpIpAddress": "string",
                    "ipConfigurationId": "string"
                  }
                ],
                "vpnLinkConnectionMode": "string",
                "vpnSiteLink": {
                  "id": "string"
                }
              }
            }
          ]
        }
      }
    ],
    "enableBgpRouteTranslationForNat": "bool",
    "isRoutingPreferenceInternet": "bool",
    "natRules": [
      {
        "id": "string",
        "name": "string",
        "properties": {
          "externalMappings": [
            {
              "addressSpace": "string",
              "portRange": "string"
            }
          ],
          "internalMappings": [
            {
              "addressSpace": "string",
              "portRange": "string"
            }
          ],
          "ipConfigurationId": "string",
          "mode": "string",
          "type": "string"
        }
      }
    ],
    "virtualHub": {
      "id": "string"
    },
    "vpnGatewayScaleUnit": "int"
  }
}

屬性值

vpnGateways

名稱 描述
類型 資源類型 'Microsoft.Network/vpnGateways'
apiVersion 資源 API 版本 '2022-01-01'
NAME 資源名稱 需要字串 ()

字元限制:1-80

合法字元:
英數字元、底線、句號和連字號。

以英數字元開頭。 以英數字元或底線結尾。
location 資源位置。 字串
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標籤
properties VPN 閘道的屬性。 VpnGatewayProperties

VpnGatewayProperties

名稱 描述
bgpSettings 局域網路閘道的 BGP 喇叭設定。 BgpSettings
connections 閘道的所有 VPN 連線清單。 VpnConnection[]
enableBgpRouteTranslationForNat 在此 VpnGateway 上啟用 NAT 的 BGP 路由轉譯。 bool
isRoutingPreferenceInternet 為 VpnGateway 的公用 IP 介面啟用路由喜好設定屬性。 bool
natRules 與閘道相關聯的所有 nat 規則清單。 VpnGatewayNatRule[]
virtualHub 網關所屬的 VirtualHub。 SubResource
vpnGatewayScaleUnit 此 VPN 閘道的縮放單位。 int

BgpSettings

名稱 描述
asn BGP 喇叭的 ASN。 int

約束:
最小值 = 0
最大值 = 4294967295
bgpPeeringAddress 此 BGP 說話者的 BGP 對等互連位址和 BGP 識別碼。 字串
bgpPeeringAddresses 具有虛擬網路閘道IP組態標識碼的 BGP 對等互連位址。 IPConfigurationBgpPeeringAddress[]
peerWeight 新增至從此 BGP 喇叭學習路由的權數。 int

IPConfigurationBgpPeeringAddress

名稱 描述
customBgpIpAddresses 屬於IP組態的自訂BGP對等互連位址清單。 string[]
ipconfigurationId 屬於閘道的IP組態標識碼。 字串

VpnConnection

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties VPN 連線的屬性。 VpnConnectionProperties

VpnConnectionProperties

名稱 描述
connectionBandwidth MBPS 的預期頻寬。 int
dpdTimeoutSeconds VPN 連線的 DPD 逾時,以秒為單位。 int
enableBgp EnableBgp 旗標。 bool
enableInternetSecurity 啟用因特網安全性。 bool
enableRateLimiting EnableBgp 旗標。 bool
ipsecPolicies 此連線要考慮的IPSec原則。 IpsecPolicy[]
remoteVpnSite 已連線 VPN 網站的識別碼。 SubResource
routingConfiguration 路由組態,指出此聯機上相關聯的和傳播的路由表。 RoutingConfiguration
routingWeight VPN 連線的路由權數。 int
sharedKey Vpn 連線的 SharedKey。 字串
trafficSelectorPolicies 此連線要考慮的流量選取器原則。 TrafficSelectorPolicy[]
useLocalAzureIpAddress 使用本機 Azure IP 起始連線。 bool
usePolicyBasedTrafficSelectors 啟用以原則為基礎的流量選取器。 bool
vpnConnectionProtocolType 用於此連線的連線通訊協定。 'IKEv1'
'IKEv2'
vpnLinkConnections 閘道的所有 VPN 網站連結連線清單。 VpnSiteLinkConnection[]

IpsecPolicy

名稱 描述
dhGroup IKE 階段 1 中用於初始 SA 的 DH 群組。 'DHGroup1'
'DHGroup14'
'DHGroup2'
'DHGroup2048'
'DHGroup24'
'ECP256'
'ECP384'
必要 『None』 ()
ikeEncryption IKE 加密演算法 (IKE 階段 2) 。 'AES128'
'AES192'
'AES256'
'DES'
'DES3'
'GCMAES128'
需要 『GCMAES256』 ()
ikeIntegrity IKE 完整性演算法 (IKE 階段 2) 。 'GCMAES128'
'GCMAES256'
'MD5'
'SHA1'
'SHA256'
需要 『SHA384』 ()
ipsecEncryption IPSec 加密演算法 (IKE 階段 1) 。 'AES128'
'AES192'
'AES256'
'DES'
'DES3'
'GCMAES128'
'GCMAES192'
'GCMAES256'
必要 『None』 ()
ipsecIntegrity IPSec 完整性演算法 (IKE 階段 1) 。 'GCMAES128'
'GCMAES192'
'GCMAES256'
'MD5'
'SHA1'
'SHA256' (必要)
pfsGroup IKE 階段 2 中用於新子 SA 的 Pfs 群組。 'ECP256'
'ECP384'
'None'
'PFS1'
'PFS14'
'PFS2'
'PFS2048'
'PFS24'
需要 『PFSMM』 ()
saDataSizeKilobytes IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) KB 的承載大小,適用於站對站 VPN 通道。 需要 int ()
saLifeTimeSeconds IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) 存留期,以秒為單位,讓站對站 VPN 通道。 需要 int ()

SubResource

名稱 描述
id 資源識別碼。 字串

RoutingConfiguration

名稱 描述
associatedRouteTable 與此 RoutingConfiguration 相關聯的資源標識碼 RouteTable。 SubResource
propagatedRouteTables 要公告路由的 RouteTable 列表。 PropagatedRouteTable
vnetRoutes 控制從 VirtualHub 到虛擬網路連線路由的路由清單。 VnetRoute

PropagatedRouteTable

名稱 描述
ids 所有 RouteTable 的資源標識符清單。 SubResource[]
標籤 標籤清單。 string[]

VnetRoute

名稱 描述
staticRoutes 所有靜態路由的清單。 StaticRoute[]

StaticRoute

名稱 描述
addressPrefixes 所有地址前綴的清單。 string[]
NAME VnetRoute 內唯一的 StaticRoute 名稱。 字串
nextHopIpAddress 下一個躍點的IP位址。 字串

TrafficSelectorPolicy

名稱 描述
localAddressRanges CIDR 格式的本機位址空間集合。 string[] (必要)
remoteAddressRanges CIDR 格式的遠端位址空間集合。 string[] (必要)

VpnSiteLinkConnection

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties VPN 網站連結連線的屬性。 VpnSiteLinkConnectionProperties

VpnSiteLinkConnectionProperties

名稱 描述
connectionBandwidth MBPS 的預期頻寬。 int
egressNatRules 輸出 NatRules 的清單。 SubResource[]
enableBgp EnableBgp 旗標。 bool
enableRateLimiting EnableBgp 旗標。 bool
ingressNatRules 輸入 NatRules 的清單。 SubResource[]
ipsecPolicies 此連線要考慮的IPSec原則。 IpsecPolicy[]
routingWeight VPN 連線的路由權數。 int
sharedKey VPN 連線的 SharedKey。 字串
useLocalAzureIpAddress 使用本機 Azure IP 起始連線。 bool
usePolicyBasedTrafficSelectors 啟用以原則為基礎的流量選取器。 bool
vpnConnectionProtocolType 用於此連線的連線通訊協定。 'IKEv1'
'IKEv2'
vpnGatewayCustomBgpAddresses vpnGatewayCustomBgpAddresses 使用此聯機。 GatewayCustomBgpIpAddressIpConfiguration[]
vpnLinkConnectionMode Vpn 連結連線模式。 'Default'
'InitiatorOnly'
'ResponderOnly'
vpnSiteLink 線上的 VPN 網站鏈接識別碼。 SubResource

GatewayCustomBgpIpAddressIpConfiguration

名稱 描述
customBgpIpAddress 屬於 IpconfigurationId 的自定義 BgpPeeringAddress。 字串 (必要)
ipConfigurationId 屬於閘道之 ipconfiguration 的 IpconfigurationId。 字串 (必要)

VpnGatewayNatRule

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties VpnGateway NAT 規則的屬性。 VpnGatewayNatRuleProperties

VpnGatewayNatRuleProperties

名稱 描述
externalMappings NAT 的私人IP位址外部對應。 VpnNatRuleMapping[]
internalMappings NAT 的私人IP位址內部對應。 VpnNatRuleMapping[]
ipConfigurationId 此 NAT 規則適用的IP組態標識碼。 字串
mode VPN NAT 的來源 NAT 方向。 'EgressSnat'
'IngressSnat'
類型 VPN NAT 的 NAT 規則類型。 'Dynamic'
'Static'

VpnNatRuleMapping

名稱 描述
addressSpace Vpn NatRule 對應的地址空間。 字串
portRange Vpn NatRule 對應的埠範圍。 字串

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
建立 Virtual WAN 資源

部署至 Azure
此範本可讓您建立虛擬 WAN 資源,包括 Virtual WAN、虛擬中樞、VPN 閘道、VPN 網站和 VPN Connecton。
Azure Virtual WAN 路由意圖和原則

部署至 Azure
此範本會布建 Azure Virtual WAN,並啟用路由意圖和原則功能的兩個中樞。
Azure Virtual WAN (vWAN) 多中樞部署

部署至 Azure
此範本可讓您建立 Azure Virtual WAN (vWAN) 多中樞部署,包括所有閘道和 VNET 連線。
Azure vWAN 多中樞部署與自定義路由表

部署至 Azure
此範本可讓您建立 Azure Virtual WAN (vWAN) 多中樞部署,包括所有網關和 VNET 連線,並示範路由表用於自定義路由的使用方式。

Terraform (AzAPI 提供者) 資源定義

vpnGateways 資源類型可以使用目標作業進行部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.Network/vpnGateways 資源,請將下列 Terraform 新增至範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Network/vpnGateways@2022-01-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    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"
            trafficSelectorPolicies = [
              {
                localAddressRanges = [
                  "string"
                ]
                remoteAddressRanges = [
                  "string"
                ]
              }
            ]
            useLocalAzureIpAddress = bool
            usePolicyBasedTrafficSelectors = bool
            vpnConnectionProtocolType = "string"
            vpnLinkConnections = [
              {
                id = "string"
                name = "string"
                properties = {
                  connectionBandwidth = int
                  egressNatRules = [
                    {
                      id = "string"
                    }
                  ]
                  enableBgp = bool
                  enableRateLimiting = bool
                  ingressNatRules = [
                    {
                      id = "string"
                    }
                  ]
                  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"
                  vpnGatewayCustomBgpAddresses = [
                    {
                      customBgpIpAddress = "string"
                      ipConfigurationId = "string"
                    }
                  ]
                  vpnLinkConnectionMode = "string"
                  vpnSiteLink = {
                    id = "string"
                  }
                }
              }
            ]
          }
        }
      ]
      enableBgpRouteTranslationForNat = bool
      isRoutingPreferenceInternet = bool
      natRules = [
        {
          id = "string"
          name = "string"
          properties = {
            externalMappings = [
              {
                addressSpace = "string"
                portRange = "string"
              }
            ]
            internalMappings = [
              {
                addressSpace = "string"
                portRange = "string"
              }
            ]
            ipConfigurationId = "string"
            mode = "string"
            type = "string"
          }
        }
      ]
      virtualHub = {
        id = "string"
      }
      vpnGatewayScaleUnit = int
    }
  })
}

屬性值

vpnGateways

名稱 描述
類型 資源類型 “Microsoft.Network/vpnGateways@2022-01-01”
NAME 資源名稱 需要字串 ()

字元限制:1-80

合法字元:
英數字元、底線、句號和連字號。

以英數字元開頭。 以英數字元或底線結尾。
location 資源位置。 字串
parent_id 若要部署至資源群組,請使用該資源群組的標識碼。 需要字串 ()
tags 資源標籤。 標記名稱和值的字典。
properties VPN 閘道的屬性。 VpnGatewayProperties

VpnGatewayProperties

名稱 描述
bgpSettings 局域網路閘道的 BGP 喇叭設定。 BgpSettings
connections 閘道的所有 VPN 連線清單。 VpnConnection[]
enableBgpRouteTranslationForNat 在此 VpnGateway 上啟用 NAT 的 BGP 路由轉譯。 bool
isRoutingPreferenceInternet 為 VpnGateway 的公用 IP 介面啟用路由喜好設定屬性。 bool
natRules 與閘道相關聯的所有 nat 規則清單。 VpnGatewayNatRule[]
virtualHub 網關所屬的 VirtualHub。 SubResource
vpnGatewayScaleUnit 此 VPN 閘道的縮放單位。 int

BgpSettings

名稱 描述
asn BGP 喇叭的 ASN。 int

約束:
最小值 = 0
最大值 = 4294967295
bgpPeeringAddress 此 BGP 說話者的 BGP 對等互連位址和 BGP 識別碼。 字串
bgpPeeringAddresses 具有虛擬網路閘道IP組態標識碼的 BGP 對等互連位址。 IPConfigurationBgpPeeringAddress[]
peerWeight 新增至從此 BGP 喇叭學習路由的權數。 int

IPConfigurationBgpPeeringAddress

名稱 描述
customBgpIpAddresses 屬於IP組態的自訂BGP對等互連位址清單。 string[]
ipconfigurationId 屬於閘道的IP組態標識碼。 字串

VpnConnection

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties VPN 連線的屬性。 VpnConnectionProperties

VpnConnectionProperties

名稱 描述
connectionBandwidth MBPS 的預期頻寬。 int
dpdTimeoutSeconds VPN 連線的 DPD 逾時,以秒為單位。 int
enableBgp EnableBgp 旗標。 bool
enableInternetSecurity 啟用因特網安全性。 bool
enableRateLimiting EnableBgp 旗標。 bool
ipsecPolicies 此連線要考慮的IPSec原則。 IpsecPolicy[]
remoteVpnSite 已連線 VPN 網站的識別碼。 SubResource
routingConfiguration 路由組態,指出此聯機上相關聯的和傳播的路由表。 RoutingConfiguration
routingWeight VPN 連線的路由權數。 int
sharedKey Vpn 連線的 SharedKey。 字串
trafficSelectorPolicies 此連線要考慮的流量選取器原則。 TrafficSelectorPolicy[]
useLocalAzureIpAddress 使用本機 Azure IP 起始連線。 bool
usePolicyBasedTrafficSelectors 啟用以原則為基礎的流量選取器。 bool
vpnConnectionProtocolType 用於此連線的連線通訊協定。 “IKEv1”
“IKEv2”
vpnLinkConnections 閘道的所有 VPN 網站連結連線清單。 VpnSiteLinkConnection[]

IpsecPolicy

名稱 描述
dhGroup IKE 階段 1 中用於初始 SA 的 DH 群組。 “DHGroup1”
“DHGroup14”
“DHGroup2”
“DHGroup2048”
“DHGroup24”
“ECP256”
“ECP384”
“None” (必要)
ikeEncryption IKE 加密演算法 (IKE 階段 2) 。 “AES128”
“AES192”
“AES256”
“DES”
“DES3”
“GCMAES128”
“GCMAES256” (必要)
ikeIntegrity IKE 完整性演算法 (IKE 階段 2) 。 “GCMAES128”
“GCMAES256”
“MD5”
“SHA1”
“SHA256”
“SHA384” (必要)
ipsecEncryption IPSec 加密演算法 (IKE 階段 1) 。 “AES128”
“AES192”
“AES256”
“DES”
“DES3”
“GCMAES128”
“GCMAES192”
“GCMAES256”
“None” (必要)
ipsecIntegrity IPSec 完整性演算法 (IKE 階段 1) 。 “GCMAES128”
“GCMAES192”
“GCMAES256”
“MD5”
“SHA1”
“SHA256” (必要)
pfsGroup IKE 階段 2 中用於新子 SA 的 Pfs 群組。 “ECP256”
“ECP384”
"None"
“PFS1”
“PFS14”
“PFS2”
“PFS2048”
“PFS24”
“PFSMM” (必要)
saDataSizeKilobytes IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) KB 的承載大小,適用於站對站 VPN 通道。 需要 int ()
saLifeTimeSeconds IPSec 安全性關聯 (也稱為快速模式或階段 2 SA) 存留期,以秒為單位,讓站對站 VPN 通道。 需要 int ()

SubResource

名稱 描述
id 資源識別碼。 字串

RoutingConfiguration

名稱 描述
associatedRouteTable 與此 RoutingConfiguration 相關聯的資源標識碼 RouteTable。 SubResource
propagatedRouteTables 要公告路由的 RouteTable 列表。 PropagatedRouteTable
vnetRoutes 控制從 VirtualHub 到虛擬網路連線路由的路由清單。 VnetRoute

PropagatedRouteTable

名稱 描述
ids 所有 RouteTable 的資源標識符清單。 SubResource[]
標籤 標籤清單。 string[]

VnetRoute

名稱 描述
staticRoutes 所有靜態路由的清單。 StaticRoute[]

StaticRoute

名稱 描述
addressPrefixes 所有地址前綴的清單。 string[]
NAME VnetRoute 內唯一的 StaticRoute 名稱。 字串
nextHopIpAddress 下一個躍點的IP位址。 字串

TrafficSelectorPolicy

名稱 描述
localAddressRanges CIDR 格式的本機位址空間集合。 string[] (必要)
remoteAddressRanges CIDR 格式的遠端位址空間集合。 string[] (必要)

VpnSiteLinkConnection

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties VPN 網站連結連線的屬性。 VpnSiteLinkConnectionProperties

VpnSiteLinkConnectionProperties

名稱 描述
connectionBandwidth MBPS 的預期頻寬。 int
egressNatRules 輸出 NatRules 的清單。 SubResource[]
enableBgp EnableBgp 旗標。 bool
enableRateLimiting EnableBgp 旗標。 bool
ingressNatRules 輸入 NatRules 的清單。 SubResource[]
ipsecPolicies 此連線要考慮的IPSec原則。 IpsecPolicy[]
routingWeight VPN 連線的路由權數。 int
sharedKey Vpn 連線的 SharedKey。 字串
useLocalAzureIpAddress 使用本機 Azure IP 起始連線。 bool
usePolicyBasedTrafficSelectors 啟用以原則為基礎的流量選取器。 bool
vpnConnectionProtocolType 用於此連線的連線通訊協定。 “IKEv1”
“IKEv2”
vpnGatewayCustomBgpAddresses vpnGatewayCustomBgpAddresses 由此連線使用。 GatewayCustomBgpIpAddressIpConfiguration[]
vpnLinkConnectionMode Vpn 連結連線模式。 “預設值”
“InitiatorOnly”
“ResponderOnly”
vpnSiteLink 已連線 VPN 網站鏈接的識別碼。 SubResource

GatewayCustomBgpIpAddressIpConfiguration

名稱 描述
customBgpIpAddress 屬於 IpconfigurationId 的自定義 BgpPeeringAddress。 需要字串 ()
ipConfigurationId 屬於閘道之 ipconfiguration 的 IpconfigurationId。 需要字串 ()

VpnGatewayNatRule

名稱 描述
id 資源識別碼。 字串
NAME 資源群組內唯一的資源名稱。 此名稱可用來存取資源。 字串
properties VpnGateway NAT 規則的屬性。 VpnGatewayNatRuleProperties

VpnGatewayNatRuleProperties

名稱 描述
externalMappings NAT 的私人IP位址外部對應。 VpnNatRuleMapping[]
internalMappings NAT 的私人IP位址內部對應。 VpnNatRuleMapping[]
ipConfigurationId 此 NAT 規則適用的IP組態標識碼。 字串
mode VPN NAT 的來源 NAT 方向。 “EgressSnat”
“IngressSnat”
類型 VPN NAT 的 NAT 規則類型。 “Dynamic”
“Static”

VpnNatRuleMapping

名稱 描述
addressSpace Vpn NatRule 對應的地址空間。 字串
portRange Vpn NatRule 對應的埠範圍。 字串