Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 11 You must be signed in to fork a gist
  • Save goyalmohit/b2b2df81ed9b90aca5a59615e357a422 to your computer and use it in GitHub Desktop.
Save goyalmohit/b2b2df81ed9b90aca5a59615e357a422 to your computer and use it in GitHub Desktop.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appServiceName": {
"type": "string",
"minLength": 1,
"maxLength": 10
},
"appServicePlanName": {
"type": "string",
"minLength": 1
},
"appServicePlanSkuName": {
"type": "string",
"defaultValue": "S1",
"allowedValues": [
"F1",
"D1",
"B1",
"B2",
"B3",
"S1",
"S2",
"S3",
"P1",
"P2",
"P3",
"P4"
],
"metadata": {
"description": "Describes plan's pricing tier and capacity. Check details at https://azure.microsoft.com/en-us/pricing/details/app-service/"
}
}
},
"variables": {
"appHostingPlanNameVar": "[concat(parameters('appServicePlanName'),'-apps')]"
},
"resources": [
{
"name": "[variables('appHostingPlanNameVar')]",
"type": "Microsoft.Web/serverfarms",
"location": "[resourceGroup().location]",
"apiVersion": "2015-08-01",
"sku": {
"name": "[parameters('appServicePlanSkuName')]"
},
"dependsOn": [ ],
"tags": {
"displayName": "appServicePlan"
},
"properties": {
"name": "[variables('appHostingPlanNameVar')]",
"numberOfWorkers": 1
}
},
{
"name": "[parameters('appServiceName')]",
"type": "Microsoft.Web/sites",
"location": "[resourceGroup().location]",
"apiVersion": "2015-08-01",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('appHostingPlanNameVar'))]"
],
"tags": {
"[concat('hidden-related:', resourceId('Microsoft.Web/serverfarms', variables('appHostingPlanNameVar')))]": "Resource",
"displayName": "webApp"
},
"properties": {
"name": "[parameters('appServiceName')]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appHostingPlanNameVar'))]"
}
}],
"outputs": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment