-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathazuredeploy.json
More file actions
151 lines (151 loc) · 5.46 KB
/
azuredeploy.json
File metadata and controls
151 lines (151 loc) · 5.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
{
"$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": {}
}