Reputation: 517
I try to deploy ARM template of App service environment v2 I took it from official Azure GitHub repository https://github.com/Azure/azure-quickstart-templates/tree/master/201-web-app-asp-app-on-asev2-create .
When I launch it fails with "Cannot find hostingEnvironments with name".
Upvotes: 1
Views: 1949
Reputation: 8491
The template which you shared will not create ASE for you. By clicking the edit template link, I found that it only create 2 Azure resources. One is Azure Web App Plan, the other is Azure Web App.
To get the ARM template of creating a ASE v2, you could perform the create action on Azure portal. After input the required field, click Automation options to generate the ARM template.
Here is the sample ARM template generated on my side.
{
"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"
}
Upvotes: 1
Reputation: 21
The pricing tier is marked as a string but the default value assigned is an int, so the ARM template barfs on deploy.
Upvotes: 1