如何使用ARM模板部署隔离的应用服务环境

时间:2017-11-04 15:48:27

标签: azure azure-web-app-service paas arm-template azure-app-service-envrmnt

是否有人知道在ARM模板中需要使用哪些值来部署隔离(例如I3)应用服务环境。我可以通过门户手动部署,然后部署I系列服务计划,但我只能通过ARM模板获得P系列ASE,看资源管理器并不能启发我。这是我的模板的ASE部分:

{
  "type": "Microsoft.Web/hostingEnvironments",
  "name": "ase1",
  "apiVersion": "2016-09-01",
  "location": "North Europe",
  "dependsOn": [],
  "properties": {
    "name": "ase1",
    "location": "North Europe",
    "ipSslAddressCount": 0,
    "internalLoadBalancingMode": "Web",
    "dnsSuffix": "somedns.co.uk",
    "virtualNetwork": {
      "Id": "someVNetId",
      "Subnet": "somesubnetName"
    },
    "multiSize": "Standard_D1_V2",
    "multiRoleCount": 2,
    "workerPools": [
      {
        "workerSizeId": 0,
        "workerSize": "Small",
        "workerCount": 0
      },
      {
        "workerSizeId": 1,
        "workerSize": "small",
        "workerCount": 0
      },
      {
        "workerSizeId": 2,
        "workerSize": "small",
        "workerCount": "0"
      }
    ]
  }
}

1 个答案:

答案 0 :(得分:1)

我不确定我是否正确理解了这个问题,但是要部署ASEv1 vs ASEv2,请使用kind属性。

    {
        "name": "[parameters('name')]",
        "type": "Microsoft.Web/hostingEnvironments",
        "properties": {
            "name": "[parameters('name')]",
            "location": "[parameters('location')]",
            "VirtualNetwork": {
                "Id": "[parameters('vnetId')]",
                "type": "Microsoft.Network/virtualNetworks",
                "Subnet": "[parameters('subnetName')]"
            },
            "dnsSuffix": "xxx",
            "internalLoadBalancingMode": # None, Publishing or Web
# https://docs.microsoft.com/en-us/rest/api/appservice/appserviceenvironments/createorupdate#definitions_internalloadbalancingmode
        },
        "location": "[parameters('location')]",
        "apiVersion": "2015-02-01",
        "kind": ASEV2 or ASEV1 (for old ASE)
    }