|
| 1 | +{ |
| 2 | + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", |
| 3 | + "contentVersion": "1.0.0.0", |
| 4 | + "parameters": { |
| 5 | + "ASE-APP-SERVICE-APPWorkerSize": { |
| 6 | + "type": "string", |
| 7 | + "allowedValues": [ |
| 8 | + "0", |
| 9 | + "1", |
| 10 | + "2" |
| 11 | + ], |
| 12 | + "metadata": { |
| 13 | + "description": "App Service Worker Size" |
| 14 | + }, |
| 15 | + "defaultValue": "0" |
| 16 | + }, |
| 17 | + "ASE-Location": { |
| 18 | + "type": "string", |
| 19 | + "allowedValues": [ |
| 20 | + "Central US", |
| 21 | + "East US", |
| 22 | + "East US 2", |
| 23 | + "North Central US", |
| 24 | + "South Central US", |
| 25 | + "West US", |
| 26 | + "Canada Central", |
| 27 | + "North Europe", |
| 28 | + "West Europe", |
| 29 | + "East Asia", |
| 30 | + "Southeast Asia", |
| 31 | + "Japan East", |
| 32 | + "Japan West", |
| 33 | + "Brazil South", |
| 34 | + "Australia East", |
| 35 | + "Australia Southeast", |
| 36 | + "West India", |
| 37 | + "Central India", |
| 38 | + "South India" |
| 39 | + ], |
| 40 | + "metadata": { |
| 41 | + "description": "Location of the App Service Environment" |
| 42 | + } |
| 43 | + }, |
| 44 | + "ASE-ipSslAddressCount": { |
| 45 | + "type": "int", |
| 46 | + "defaultValue": 1, |
| 47 | + "metadata": { |
| 48 | + "description": "Number of IP addresses for the IP-SSL address pool." |
| 49 | + } |
| 50 | + }, |
| 51 | + "ASE-frontEndSize": { |
| 52 | + "type": "string", |
| 53 | + "allowedValues": [ |
| 54 | + "Medium", |
| 55 | + "Large", |
| 56 | + "ExtraLarge" |
| 57 | + ], |
| 58 | + "defaultValue": "Medium", |
| 59 | + "metadata": { |
| 60 | + "description": "Instance size for the front-end pool. Maps to P2,P3,P4." |
| 61 | + } |
| 62 | + }, |
| 63 | + "ASE-frontEndCount": { |
| 64 | + "type": "int", |
| 65 | + "defaultValue": 2, |
| 66 | + "minValue" : 2, |
| 67 | + "metadata": { |
| 68 | + "description": "Number of instances in the front-end pool. Minimum of two." |
| 69 | + } |
| 70 | + }, |
| 71 | + "ASE-workerPoolOneInstanceSize": { |
| 72 | + "type": "string", |
| 73 | + "allowedValues": [ |
| 74 | + "Small", |
| 75 | + "Medium", |
| 76 | + "Large", |
| 77 | + "ExtraLarge" |
| 78 | + ], |
| 79 | + "defaultValue": "Small", |
| 80 | + "metadata": { |
| 81 | + "description": "Instance size for worker pool one. Maps to P1,P2,P3,P4." |
| 82 | + } |
| 83 | + }, |
| 84 | + "ASE-workerPoolOneInstanceCount": { |
| 85 | + "type": "int", |
| 86 | + "defaultValue": 2, |
| 87 | + "minValue": 2, |
| 88 | + "metadata": { |
| 89 | + "description": "Number of instances in worker pool one. Minimum of two." |
| 90 | + } |
| 91 | + }, |
| 92 | + "ASE-workerPoolTwoInstanceSize": { |
| 93 | + "type": "string", |
| 94 | + "allowedValues": [ |
| 95 | + "Small", |
| 96 | + "Medium", |
| 97 | + "Large", |
| 98 | + "ExtraLarge" |
| 99 | + ], |
| 100 | + "defaultValue": "Small", |
| 101 | + "metadata": { |
| 102 | + "description": "Instance size for worker pool two. Maps to P1,P2,P3,P4." |
| 103 | + } |
| 104 | + }, |
| 105 | + "ASE-workerPoolTwoInstanceCount": { |
| 106 | + "type": "int", |
| 107 | + "defaultValue": 0, |
| 108 | + "metadata": { |
| 109 | + "description": "Number of instances in worker pool two. Can be zero if not using worker pool two." |
| 110 | + } |
| 111 | + }, |
| 112 | + "ASE-workerPoolThreeInstanceSize": { |
| 113 | + "type": "string", |
| 114 | + "allowedValues": [ |
| 115 | + "Small", |
| 116 | + "Medium", |
| 117 | + "Large", |
| 118 | + "ExtraLarge" |
| 119 | + ], |
| 120 | + "defaultValue": "Small", |
| 121 | + "metadata": { |
| 122 | + "description": "Instance size for worker pool three. Maps to P1,P2,P3,P4." |
| 123 | + } |
| 124 | + }, |
| 125 | + "ASE-workerPoolThreeInstanceCount": { |
| 126 | + "type": "int", |
| 127 | + "defaultValue": 0, |
| 128 | + "metadata": { |
| 129 | + "description": "Number of instances in worker pool three. Can be zero if not using worker pool three." |
| 130 | + } |
| 131 | + }, |
| 132 | + "ASE-APP-SERVICE-workerPool": { |
| 133 | + "type": "string", |
| 134 | + "allowedValues": [ |
| 135 | + "1", |
| 136 | + "2", |
| 137 | + "3" |
| 138 | + ], |
| 139 | + "defaultValue": "0", |
| 140 | + "metadata": { |
| 141 | + "description": "Defines which worker pool's (WP1, WP2 or WP3) resources will be used for the app service plan." |
| 142 | + } |
| 143 | + }, |
| 144 | + "ASE-APP-SERVICE-numberOfWorkersFromWorkerPool": { |
| 145 | + "type": "int", |
| 146 | + "defaultValue": 1, |
| 147 | + "metadata": { |
| 148 | + "description": "Defines the number of workers from the worker pool that will be used by the app service plan." |
| 149 | + } |
| 150 | + } |
| 151 | + }, |
| 152 | + "variables": { |
| 153 | + "ASE-VNETPrefix": "10.0.0.0/16", |
| 154 | + "ASE-VNETSubnet1Name": "Subnet-1", |
| 155 | + "ASE-VNETSubnet1Prefix": "10.0.0.0/24", |
| 156 | + "ASE-VNETSubnet2Name": "Subnet-2", |
| 157 | + "ASE-VNETSubnet2Prefix": "10.0.1.0/24", |
| 158 | + "ASE-WEB-APP-Name": "[concat('ASE-WEB-APP', uniqueString(resourceGroup().id))]", |
| 159 | + "ASE-Name": "[concat('ASE', uniqueString(resourceGroup().id))]", |
| 160 | + "ASE-VNET-Name": "[concat('ASE-VNET', uniqueString(resourceGroup().id))]", |
| 161 | + "ASE-SERVICE-Name": "[concat('ASE-SERVICE', uniqueString(resourceGroup().id))]" |
| 162 | + }, |
| 163 | + "resources": [ |
| 164 | + { |
| 165 | + "name": "[variables('ASE-VNET-Name')]", |
| 166 | + "type": "Microsoft.Network/virtualNetworks", |
| 167 | + "location": "[resourceGroup().location]", |
| 168 | + "apiVersion": "2015-06-15", |
| 169 | + "dependsOn": [], |
| 170 | + "tags": { |
| 171 | + "displayName": "ASE-VNET" |
| 172 | + }, |
| 173 | + "properties": { |
| 174 | + "addressSpace": { |
| 175 | + "addressPrefixes": [ |
| 176 | + "[variables('ASE-VNETPrefix')]" |
| 177 | + ] |
| 178 | + }, |
| 179 | + "subnets": [ |
| 180 | + { |
| 181 | + "name": "[variables('ASE-VNETSubnet1Name')]", |
| 182 | + "properties": { |
| 183 | + "addressPrefix": "[variables('ASE-VNETSubnet1Prefix')]" |
| 184 | + } |
| 185 | + }, |
| 186 | + { |
| 187 | + "name": "[variables('ASE-VNETSubnet2Name')]", |
| 188 | + "properties": { |
| 189 | + "addressPrefix": "[variables('ASE-VNETSubnet2Prefix')]" |
| 190 | + } |
| 191 | + } |
| 192 | + ] |
| 193 | + } |
| 194 | + }, |
| 195 | + { |
| 196 | + "apiVersion": "2015-08-01", |
| 197 | + "type": "Microsoft.Web/hostingEnvironments", |
| 198 | + "name": "[variables('ASE-Name')]", |
| 199 | + "location": "[parameters('ASE-Location')]", |
| 200 | + |
| 201 | + "dependsOn": [ |
| 202 | + "[resourceId('Microsoft.Network/virtualNetworks', variables('ASE-VNET-Name'))]" |
| 203 | + ], |
| 204 | + "tags": { |
| 205 | + "[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', variables('ASE-SERVICE-Name')))]": "Resource", |
| 206 | + "[concat('hidden-related:', resourceId('Microsoft.Web/sites', variables('ASE-WEB-APP-Name')))]": "Resource", |
| 207 | + "displayName": "ASE" |
| 208 | + }, |
| 209 | + "properties": { |
| 210 | + "name": "[variables('ASE-Name')]", |
| 211 | + "location": "[parameters('ASE-Location')]", |
| 212 | + "ipSslAddressCount": "[parameters('ASE-ipSslAddressCount')]", |
| 213 | + "virtualNetwork": { |
| 214 | + "Id": "[concat('/subscriptions/',subscription().subscriptionId,'/resourceGroups/',resourceGroup().name,'/providers/Microsoft.Network/virtualNetworks/', variables('ASE-VNET-Name'))]", |
| 215 | + "Subnet": "[variables('ASE-VNETSubnet1Name')]" |
| 216 | + }, |
| 217 | + "multiSize": "[parameters('ASE-frontEndSize')]", |
| 218 | + "multiRoleCount": "[parameters('ASE-frontEndCount')]", |
| 219 | + "workerPools": [ |
| 220 | + { |
| 221 | + "workerSizeId": 0, |
| 222 | + "workerSize": "[parameters('ASE-workerPoolOneInstanceSize')]", |
| 223 | + "workerCount": "[parameters('ASE-workerPoolOneInstanceCount')]" |
| 224 | + }, |
| 225 | + { |
| 226 | + "workerSizeId": 1, |
| 227 | + "workerSize": "[parameters('ASE-workerPoolTwoInstanceSize')]", |
| 228 | + "workerCount": "[parameters('ASE-workerPoolTwoInstanceCount')]" |
| 229 | + }, |
| 230 | + { |
| 231 | + "workerSizeId": 2, |
| 232 | + "workerSize": "[parameters('ASE-workerPoolThreeInstanceSize')]", |
| 233 | + "workerCount": "[parameters('ASE-workerPoolThreeInstanceCount')]" |
| 234 | + } |
| 235 | + ] |
| 236 | + } |
| 237 | + }, |
| 238 | + { |
| 239 | + "name": "[variables('ASE-SERVICE-Name')]", |
| 240 | + "type": "Microsoft.Web/serverfarms", |
| 241 | + "location": "[parameters('ASE-Location')]", |
| 242 | + "apiVersion": "2014-06-01", |
| 243 | + "dependsOn": [ "[resourceId('Microsoft.Web/hostingEnvironments', variables('ASE-Name'))]" ], |
| 244 | + "tags": { |
| 245 | + "displayName": "ASE-APP-SERVICE-APP" |
| 246 | + }, |
| 247 | + "properties": { |
| 248 | + "name": "[variables('ASE-SERVICE-Name')]", |
| 249 | + "hostingEnvironment": "[variables('ASE-Name')]", |
| 250 | + "hostingEnvironmentId": "[resourceId('Microsoft.Web/hostingEnvironments', variables('ASE-Name'))]" |
| 251 | + }, |
| 252 | + "sku": { |
| 253 | + "name": "[concat('P', parameters('ASE-APP-SERVICE-workerPool'))]", |
| 254 | + "tier": "Premium", |
| 255 | + "size": "[concat('P', parameters('ASE-APP-SERVICE-workerPool'))]", |
| 256 | + "family": "P", |
| 257 | + "capacity": "[parameters('ASE-APP-SERVICE-numberOfWorkersFromWorkerPool')]" |
| 258 | + } |
| 259 | + }, |
| 260 | + { |
| 261 | + "name": "[variables('ASE-WEB-APP-Name')]", |
| 262 | + "type": "Microsoft.Web/sites", |
| 263 | + "location": "[parameters('ASE-Location')]", |
| 264 | + "apiVersion": "2015-08-01", |
| 265 | + "dependsOn": [ |
| 266 | + "[resourceId('Microsoft.Web/serverfarms', variables('ASE-SERVICE-Name'))]" |
| 267 | + ], |
| 268 | + "tags": { |
| 269 | + "[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', variables('ASE-SERVICE-Name')))]": "Resource", |
| 270 | + "displayName": "ASE-WEB-APP" |
| 271 | + }, |
| 272 | + "properties": { |
| 273 | + "name": "[variables('ASE-WEB-APP-Name')]", |
| 274 | + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('ASE-SERVICE-Name'))]", |
| 275 | + "hostingEnvironment": "[variables('ASE-Name')]", |
| 276 | + "hostingEnvironmentId": "[resourceId('Microsoft.Web/hostingEnvironments', variables('ASE-Name'))]" |
| 277 | + } |
| 278 | + } |
| 279 | + ], |
| 280 | + "outputs": { |
| 281 | + } |
| 282 | +} |
0 commit comments