2017-07-31 142 views

回答

1

您共享将无法为您创建ASE通过单击编辑模板模板链接,我发现它只创建2个Azure资源,一个是Azure Web App计划,另一个是Azure Web App。

enter image description here

要获得创建ASE V2的ARM模板,你可以执行在Azure门户创建操作。输入必填字段后,单击自动化选项以生成ARM模板。

enter image description here

这是在我身边发生的样品ARM模板。

{ 
    "parameters": { 
     "vnetName": { 
      "type": "string" 
     }, 
     "vnetId": { 
      "type": "string" 
     }, 
     "location": { 
      "type": "string" 
     }, 
     "locationId": { 
      "type": "string" 
     }, 
     "subnetName": { 
      "type": "string" 
     }, 
     "VNetResourceGroupName": { 
      "type": "string" 
     }, 
     "subnetAddress": { 
      "type": "string" 
     }, 
     "vnetAddress": { 
      "type": "string" 
     }, 
     "subnetRouteTableName": { 
      "type": "string" 
     }, 
     "subnetNSGName": { 
      "type": "string" 
     }, 
     "name": { 
      "type": "string" 
     }, 
     "kind": { 
      "type": "string" 
     }, 
     "subscriptionId": { 
      "type": "string" 
     } 
    }, 
    "resources": [ 
     { 
      "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')]" 
       } 
      }, 
      "location": "[parameters('location')]", 
      "dependsOn": [ 
       "[concat('Microsoft.Network/virtualNetworks/', parameters('vnetName'))]" 
      ], 
      "apiVersion": "2015-02-01", 
      "kind": "[parameters('kind')]" 
     }, 
     { 
      "apiVersion": "2015-06-15", 
      "type": "Microsoft.Network/routeTables", 
      "name": "[parameters('subnetRouteTableName')]", 
      "location": "[parameters('location')]", 
      "tags": { 
       "displayName": "UDR - Subnet" 
      }, 
      "properties": { 
       "routes": [ 
        { 
         "name": "myase-route", 
         "properties": { 
          "addressPrefix": "0.0.0.0/0", 
          "nextHopType": "Internet" 
         } 
        } 
       ] 
      } 
     }, 
     { 
      "apiVersion": "2015-06-15", 
      "type": "Microsoft.Network/networkSecurityGroups", 
      "name": "[parameters('subnetNSGName')]", 
      "location": "[parameters('location')]", 
      "tags": { 
       "displayName": "NSG - Subnet" 
      }, 
      "properties": { 
       "securityRules": [ 
        { 
         "name": "Inbound-management", 
         "properties": { 
          "description": "Used to manage ASE from public VIP", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "454-455", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 100, 
          "direction": "Inbound" 
         } 
        }, 
        { 
         "name": "ASE-internal-inbound", 
         "properties": { 
          "description": "ASE-internal-inbound", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "*", 
          "sourceAddressPrefix": "192.168.250.0/24", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 110, 
          "direction": "Inbound" 
         } 
        }, 
        { 
         "name": "Inbound-HTTP", 
         "properties": { 
          "description": "Allow HTTP", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "80", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 120, 
          "direction": "Inbound" 
         } 
        }, 
        { 
         "name": "Inbount-HTTPS", 
         "properties": { 
          "description": "Allow HTTPS", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "443", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 130, 
          "direction": "Inbound" 
         } 
        }, 
        { 
         "name": "Inbound-FTP", 
         "properties": { 
          "description": "Allow FTP over port 21", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "21", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 140, 
          "direction": "Inbound" 
         } 
        }, 
        { 
         "name": "Inbound-FTPS", 
         "properties": { 
          "description": "Allow FTPS", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "990", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 150, 
          "direction": "Inbound" 
         } 
        }, 
        { 
         "name": "Inbound-FTP-Data", 
         "properties": { 
          "description": "RDP", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "10001-10020", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 160, 
          "direction": "Inbound" 
         } 
        }, 
        { 
         "name": "Inbound-Remote-Debugging", 
         "properties": { 
          "description": "Visual Studio remote debugging", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "4016-4022", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 170, 
          "direction": "Inbound" 
         } 
        }, 
        { 
         "name": "Outbound-443", 
         "properties": { 
          "description": "Azure Storage blob", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "443", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 100, 
          "direction": "Outbound" 
         } 
        }, 
        { 
         "name": "Outbound-SMB", 
         "properties": { 
          "description": "Azure Storage queue", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "445", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 110, 
          "direction": "Outbound" 
         } 
        }, 
        { 
         "name": "Outbound-DB", 
         "properties": { 
          "description": "Database", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "1433", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 120, 
          "direction": "Outbound" 
         } 
        }, 
        { 
         "name": "Outbound-DB2", 
         "properties": { 
          "description": "Database 2", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "11000-11999", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 130, 
          "direction": "Outbound" 
         } 
        }, 
        { 
         "name": "Outbound-DB3", 
         "properties": { 
          "description": "Database 3", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "14000-14999", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 140, 
          "direction": "Outbound" 
         } 
        }, 
        { 
         "name": "Outbound-DNS", 
         "properties": { 
          "description": "DNS", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "53", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 150, 
          "direction": "Outbound" 
         } 
        }, 
        { 
         "name": "ASE-internal-outbound", 
         "properties": { 
          "description": "Azure Storage queue", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "*", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "192.168.250.0/24", 
          "access": "Allow", 
          "priority": 160, 
          "direction": "Outbound" 
         } 
        }, 
        { 
         "name": "Outbound-80", 
         "properties": { 
          "description": "Outbound 80", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "80", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "*", 
          "access": "Allow", 
          "priority": 170, 
          "direction": "Outbound" 
         } 
        }, 
        { 
         "name": "ASE-to-VNET", 
         "properties": { 
          "description": "ASE to VNET", 
          "protocol": "*", 
          "sourcePortRange": "*", 
          "destinationPortRange": "*", 
          "sourceAddressPrefix": "*", 
          "destinationAddressPrefix": "192.168.250.0/23", 
          "access": "Allow", 
          "priority": 180, 
          "direction": "Outbound" 
         } 
        } 
       ] 
      } 
     }, 
     { 
      "apiVersion": "2016-06-01", 
      "type": "Microsoft.Network/virtualNetworks", 
      "name": "[parameters('vnetName')]", 
      "location": "[parameters('location')]", 
      "dependsOn": [ 
       "[concat('Microsoft.Network/networkSecurityGroups/', parameters('subnetNSGName'))]", 
       "[concat('Microsoft.Network/routeTables/', parameters('subnetRouteTableName'))]" 
      ], 
      "properties": { 
       "addressSpace": { 
        "addressPrefixes": [ 
         "[parameters('vnetAddress')]" 
        ] 
       }, 
       "subnets": [ 
        { 
         "name": "[parameters('subnetName')]", 
         "properties": { 
          "addressPrefix": "[parameters('subnetAddress')]", 
          "networkSecurityGroup": { 
           "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('subnetNSGName'))]" 
          }, 
          "routeTable": { 
           "id": "[resourceId('Microsoft.Network/routeTables', parameters('subnetRouteTableName'))]" 
          } 
         } 
        } 
       ] 
      } 
     } 
    ], 
    "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#", 
    "contentVersion": "1.0.0.0" 
} 
+0

谢谢你,我会考虑这个 – user6329667

+0

我导出模板与asev2,并试图对其进行重新部署在新的资源组,得到了问题:( – user6329667

1

定价等级被标记为一个字符串,但分配的默认值是int,所以上部署ARM模板barfs。