Skip to content

Instantly share code, notes, and snippets.

@shibayan
Created March 18, 2021 23:40
Show Gist options
  • Save shibayan/7d7fedb50d4f415e4754234cf1a54115 to your computer and use it in GitHub Desktop.
Save shibayan/7d7fedb50d4f415e4754234cf1a54115 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": {
"webAppName": {
"type": "string",
"metadata": {
"description": "Base name of the resource such as web app name and app service plan"
},
"minLength": 2
},
"sku": {
"type": "string",
"defaultValue": "S1",
"metadata": {
"description": "The SKU of App Service Plan, by default is Standard S1"
}
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]",
"metadata": {
"description": "Location for all resources"
}
}
},
"variables": {
"webAppPortalName": "[concat(parameters('webAppName'), '-app')]",
"appServicePlanName": "[concat('ASP-', parameters('webAppName'))]"
},
"resources": [
{
"apiVersion": "2019-08-01",
"type": "Microsoft.Web/serverfarms",
"kind": "app",
"name": "[variables('appServicePlanName')]",
"location": "[parameters('location')]",
"sku": {
"name": "[parameters('sku')]"
}
},
{
"apiVersion": "2019-08-01",
"type": "Microsoft.Web/sites",
"kind": "app",
"name": "[variables('webAppPortalName')]",
"location": "[parameters('location')]",
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]"
],
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]"
},
"resources": [
{
"apiVersion": "2019-08-01",
"type": "extensions",
"name": "zipdeploy",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('webAppPortalName'))]"
],
"properties": {
"packageUri": "https://shibayan.blob.core.windows.net/AspNetCoreApp.zip"
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment