Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
151 lines (151 sloc) 5.46 KB
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"functionAppName": {
"type": "string",
"metadata": {
"description": "Name of your project, has to be globally unique!"
}
},
"location": {
"type": "string",
"defaultValue": "Central US",
"metadata": {
"description": "Select a location for your resources"
}
}
},
"variables": {
"prefix": "[toLower(parameters('functionAppName'))]",
"functionPlanAppName": "[concat(variables('prefix'),'asp')]",
"functionAppName": "[variables('prefix')]",
"applicationInsightsName": "[concat(variables('prefix'),'ai')]",
"storageAccountName": "[concat(variables('prefix'),'st')]",
"durableStorageAccountName": "[concat(variables('prefix'),'dst')]",
"signalRServiceName": "[concat(variables('prefix'),'asrs')]"
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "Storage",
"name": "[variables('storageAccountName')]",
"apiVersion": "2016-01-01",
"location": "[parameters('location')]",
"properties": {},
"dependsOn": []
},
{
"type": "Microsoft.Storage/storageAccounts",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "Storage",
"name": "[variables('durableStorageAccountName')]",
"apiVersion": "2016-01-01",
"location": "[parameters('location')]",
"properties": {},
"dependsOn": []
},
{
"type": "Microsoft.Web/serverFarms",
"apiVersion": "2016-09-01",
"name": "[variables('functionPlanAppName')]",
"location": "[parameters('location')]",
"properties": {
"name": "[variables('functionPlanAppName')]",
"computeMode": "Dynamic",
"maximumElasticWorkerCount": "20"
},
"kind": "elastic",
"sku": {
"name": "EP2",
"tier": "ElasticPremium"
}
},
{
"type": "Microsoft.Web/sites",
"apiVersion": "2016-08-01",
"name": "[variables('functionAppName')]",
"location": "[parameters('location')]",
"kind": "functionapp",
"properties": {
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('functionPlanAppName'))]",
"siteConfig": {
"appSettings": [
{
"name": "AzureWebJobsDashboard",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')),'2015-05-01-preview').key1)]"
},
{
"name": "AzureWebJobsStorage",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')),'2015-05-01-preview').key1)]"
},
{
"name": "DurableFunctionsStorageAccount",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('durableStorageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('durableStorageAccountName')),'2015-05-01-preview').key1)]"
},
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~2"
},
{
"name": "APPINSIGHTS_INSTRUMENTATIONKEY",
"value": "[reference(resourceId('Microsoft.Insights/components', variables('applicationInsightsName')), '2014-04-01').InstrumentationKey]"
},
{
"name": "AzureSignalRConnectionString",
"value": "[concat('Endpoint=https://', variables('signalRServiceName'), '.service.signalr.net;AccessKey=', listKeys(resourceId('Microsoft.SignalRService/SignalR', variables('signalRServiceName')), providers('Microsoft.SignalRService','SignalR').apiVersions[0]).primaryKey)]"
}
]
}
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('functionPlanAppName'))]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
"[resourceId('microsoft.insights/components', variables('applicationInsightsName'))]",
"[resourceId('Microsoft.SignalRService/SignalR', variables('signalRServiceName'))]"
]
},
{
"type": "Microsoft.Insights/components",
"apiVersion": "2015-05-01",
"kind": "web",
"name": "[variables('applicationInsightsName')]",
"location": "[parameters('location')]",
"tags": {},
"properties": {
"ApplicationId": "[variables('applicationInsightsName')]"
},
"dependsOn": []
},
{
"type": "Microsoft.SignalRService/SignalR",
"apiVersion": "2018-10-01",
"name": "[variables('signalRServiceName')]",
"location": "[parameters('location')]",
"sku": {
"name": "Standard_S1",
"tier": "Standard",
"size": "S1",
"capacity": 1
},
"properties": {
"hostNamePrefix": "[variables('signalRServiceName')]",
"features": [
{
"flag": "ServiceMode",
"value": "Serverless",
"properties": {}
}
]
}
}
],
"outputs": {}
}
You can’t perform that action at this time.