Skip to content

Instantly share code, notes, and snippets.

@BernieWhite
Created September 20, 2018 05:49
Show Gist options
  • Save BernieWhite/51e09fd804b46855f8f3e85073bc181e to your computer and use it in GitHub Desktop.
Save BernieWhite/51e09fd804b46855f8f3e85073bc181e to your computer and use it in GitHub Desktop.
app-service-demo.json
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"appName": {
"type": "string"
},
"appPlanName": {
"type": "string"
}
},
"variables": {},
"resources": [
{
"comments": "",
"type": "Microsoft.Web/serverfarms",
"sku": {
"name": "S1",
"tier": "Standard",
"size": "S1",
"family": "S",
"capacity": 1
},
"kind": "app",
"name": "[parameters('appPlanName')]",
"apiVersion": "2016-09-01",
"location": "[resourceGroup().location]",
"tags": {},
"scale": null,
"properties": {
"name": "[parameters('appPlanName')]"
},
"dependsOn": []
},
{
"comments": "",
"type": "Microsoft.Web/sites",
"kind": "app",
"name": "[parameters('appName')]",
"apiVersion": "2016-08-01",
"location": "[resourceGroup().location]",
"tags": {},
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('appPlanName'))]",
"clientAffinityEnabled": true
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', parameters('appPlanName'))]"
]
},
{
"comments": "",
"type": "Microsoft.Web/sites/config",
"name": "[concat(parameters('appName'), '/web')]",
"apiVersion": "2016-08-01",
"location": "[resourceGroup().location]",
"tags": {},
"scale": null,
"properties": {
"defaultDocuments": [
"Default.htm",
"Default.html",
"Default.asp",
"index.htm",
"index.html",
"iisstart.htm",
"default.aspx",
"index.php",
"hostingstart.html"
],
"netFrameworkVersion": "v4.0",
"phpVersion": "",
"scmType": "None",
"alwaysOn": true,
"managedPipelineMode": "Integrated",
"virtualApplications": [
{
"virtualPath": "/",
"physicalPath": "site\\wwwroot",
"preloadEnabled": true,
"virtualDirectories": null
}
],
"minTlsVersion": "1.2",
"ftpsState": "Disabled"
},
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('appName'))]"
]
},
{
"comments": "",
"type": "Microsoft.Web/sites/slots",
"kind": "app",
"name": "[concat(parameters('appName'), '/staging')]",
"apiVersion": "2016-08-01",
"location": "[resourceGroup().location]",
"tags": {},
"scale": null,
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('appPlanName'))]",
"clientAffinityEnabled": true
},
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('appName'))]",
"[resourceId('Microsoft.Web/serverfarms', parameters('appPlanName'))]"
]
},
{
"comments": "",
"type": "Microsoft.Web/sites/slots/config",
"name": "[concat(parameters('appName'), '/staging/web')]",
"apiVersion": "2016-08-01",
"location": "[resourceGroup().location]",
"tags": {},
"properties": {
"defaultDocuments": [
"Default.htm",
"Default.html",
"Default.asp",
"index.htm",
"index.html",
"iisstart.htm",
"default.aspx",
"index.php",
"hostingstart.html"
],
"netFrameworkVersion": "v4.0",
"phpVersion": "",
"scmType": "LocalGit",
"alwaysOn": false,
"managedPipelineMode": "Integrated",
"virtualApplications": [
{
"virtualPath": "/",
"physicalPath": "site\\wwwroot",
"preloadEnabled": false,
"virtualDirectories": null
}
],
"minTlsVersion": "1.2",
"ftpsState": "Disabled"
},
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('appName'))]",
"[resourceId('Microsoft.Web/sites/slots', parameters('appName'), 'staging')]"
]
}
],
"outputs": {
"appUrl": {
"type": "string",
"value": "[concat('https://', parameters('appName'), '.azurewebsites.net/')]"
},
"gitCloneUrl": {
"type": "string",
"value": "[concat('https://', parameters('appName'), '-staging.scm.azurewebsites.net:443/', parameters('appName'), '.git')]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment