Skip to content

Instantly share code, notes, and snippets.

@reallydontask
Last active June 1, 2020 10:33
Show Gist options
  • Save reallydontask/eb140a596992c4d8f217102153339475 to your computer and use it in GitHub Desktop.
Save reallydontask/eb140a596992c4d8f217102153339475 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": {
"appName": {
"type": "string"
},
"appServicePlanName": {
"type": "string"
},
"environment": {
"defaultValue": "dev",
"allowedValues": [
"dev",
"test",
"sandbox",
"preprod",
"prod",
"pr"
],
"type": "string"
},
"appSettings": {
"type": "object",
"defaultValue": {
"Azure__SignalR__ConnectionString":"signalRConnectionString"
}
}
},
"variables": {
"commonSettings": {
"ASPNETCORE_ENVIRONMENT": "Production",
"WEBSITE_HTTPLOGGING_RETENTION_DAYS": "5",
"ASPNETCORE_DETAILEDERRORS": true
},
"appSettings" : "[union(variables('commonSettings'), parameters('appSettings'))]"
},
"resources": [
{
"type": "Microsoft.Web/sites",
"apiVersion": "2018-11-01",
"name": "[parameters('appName')]",
"location": "[resourceGroup().location]",
"tags": {
"Environment": "[parameters('environment')]"
},
"kind": "app, Linux",
"identity": {
"type": "SystemAssigned"
},
"properties": {
"enabled": true,
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', parameters('appServicePlanName'))]",
"siteConfig": {
"linuxFxVersion": "DOTNETCORE|3.1",
"alwaysOn": true
},
"reserved": false,
"clientAffinityEnabled": false,
"clientCertEnabled": false,
"hostNamesDisabled": false,
"containerSize": 0,
"dailyMemoryTimeQuota": 0,
"httpsOnly": true
},
"resources": [
{
"type": "config",
"apiVersion": "2018-11-01",
"name": "web",
"location": "[resourceGroup().location]",
"tags": {
"Environment": "[parameters('environment')]"
},
"dependsOn": [
"[parameters('appName')]"
],
"properties": {
"linuxFxVersion": "DOTNETCORE|3.1",
"httpLoggingEnabled": true,
"alwaysOn": true
}
},
{
"apiVersion": "2016-08-01",
"name": "appsettings",
"type": "config",
"properties": "[variables('appSettings')]",
"dependsOn": [
"[parameters('appName')]"
]
}
]
}
],
"outputs": {
"principalId": {
"type": "string",
"value": "[reference(resourceId('Microsoft.Web/sites/', parameters('appName')),'2018-11-01','Full').identity.principalId]"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment