Azure ARM模板:在虚拟网络网关中设置点对点配置

时间:2017-03-09 15:19:03

标签: azure arm-template

我想设置地址池'点对点网站中的属性'由模板创建的虚拟网络网关的一部分。 这里是Azure门户中的设置 enter image description here 这里是模板

{
      "apiVersion": "2015-06-15",
      "name": "[variables('gateway').name]",
      "type": "Microsoft.Network/virtualNetworkGateways",
      "location": "[parameters('aseLocation')]",
      "dependsOn": [
          "[variables('virtualNetworkSubnet').name]",
          "[variables('publicIpVnGateway').name]"
      ],
      "properties": {
          "gatewayType": "Vpn",
          "ipConfigurations": [
              {
                  "name": "default",
                  "properties": {
                      "privateIPAllocationMethod": "Dynamic",
                      "subnet": {
                          "id": "[resourceId(resourceGroup().name, 'Microsoft.Network/virtualNetworks/subnets', variables('virtualNetwork').name, variables('virtualNetworkSubnet').name)]"
                      },
                      "publicIpAddress": {
                        "id": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', resourceGroup().name, '/providers/Microsoft.Network/publicIPAddresses/', variables('publicIpVnGateway').name)]"
                      }
                  }
              }
          ],
          "enableBgp": false,
          "vpnType": "RouteBased",
          "sku": {
              "name": "Standard",
              "tier": "Standard"
          }
      }
  }

1 个答案:

答案 0 :(得分:0)

是的,您可以使用以下属性进行操作:

            "properties": {
              "ipConfigurations": [
                {
                  "properties": {
                    "privateIPAllocationMethod": "Dynamic",
                    "subnet": {
                      "id": ""
                    },
                    "publicIPAddress": {
                      "id": ""
                    }
                  },
                  "name": "vnetGatewayConfig"
                }
              ],
              "gatewayType": "VPN",
              "vpnType": "RouteBased",
              "enableBgp": false,
              "activeActive": false,
              "vpnClientConfiguration": {
                "vpnClientAddressPool": {
                    "addressPrefixes": [
                        "<ip_address>"
                    ]
                },
                "vpnClientProtocols": [
                    "SSTP",
                    "IkeV2"
                ]
            },
              "sku": {
                "name": "<sku>",
                "tier": "<sku>",
                "capacity": "2"
              }
            }

通过插入“ vpnClientConfiguration”部分,您可以定义指向站点配置的点。另外,您也可以在此处添加证书参考。