-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazuredeploy.json
174 lines (174 loc) · 7.75 KB
/
azuredeploy.json
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"iothubName": {
"type": "string"
},
"iotHubSku": {
"type": "string",
"allowedValues": [
"F1",
"S1",
"S2"
],
"defaultValue": "F1"
},
"iotHubCapacity": {
"type": "int",
"minValue": 1,
"defaultValue": 1
}
},
"variables": {
"resourceLocation": "[resourceGroup().location]",
"siteName": "[concat('funcapp', uniquestring(resourceGroup().id))]",
"storageAccountName": "[concat('storage', uniquestring(resourceGroup().id))]"
},
"resources": [
{
"type": "Microsoft.Devices/IotHubs",
"sku": {
"name": "[parameters('iotHubSku')]",
"capacity": "[parameters('iotHubCapacity')]"
},
"name": "[parameters('iotHubName')]",
"apiVersion": "2016-02-03",
"location": "[variables('resourceLocation')]",
"tags": {},
"properties": {
"eventHubEndpoints": {
"events": {
"retentionTimeInDays": 1,
"partitionCount": 2
}
},
"enableFileUploadNotifications": false,
"features": "None"
}
},
{
"type": "Microsoft.Storage/storageAccounts",
"name": "[variables('storageAccountName')]",
"apiVersion": "2015-06-15",
"location": "[variables('resourceLocation')]",
"properties": {
"accountType": "Standard_LRS"
}
},
{
"type": "Microsoft.Web/serverfarms",
"sku": {
"name": "Y1",
"tier": "Dynamic",
"size": "Y1",
"family": "Y",
"capacity": 0
},
"kind": "functionapp",
"name": "[variables('siteName')]",
"apiVersion": "2015-08-01",
"location": "[variables('resourceLocation')]",
"properties": {
"name": "[variables('siteName')]",
"numberOfWorkers": 0
}
},
{
"type": "Microsoft.Web/sites",
"kind": "functionapp",
"name": "[variables('siteName')]",
"apiVersion": "2015-08-01",
"location": "[variables('resourceLocation')]",
"properties": {
"name": "[variables('siteName')]",
"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": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING",
"value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')),'2015-05-01-preview').key1)]"
},
{
"name": "WEBSITE_CONTENTSHARE",
"value": "[toLower(variables('siteName'))]"
},
{
"name": "FUNCTIONS_EXTENSION_VERSION",
"value": "~1"
},
{
"name": "WEBSITE_NODE_DEFAULT_VERSION",
"value": "6.5.0"
},
{
"name": "iotHubConnectionString",
"value": "[concat('HostName=', parameters('iotHubName'), '.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey=', listKeys(resourceId('Microsoft.Devices/IotHubs/Iothubkeys', parameters('iotHubName'), 'iothubowner'), '2016-02-03').primaryKey)]"
},
{
"name": "eventHubConnectionString",
"value": "[concat('Endpoint=', reference(resourceId('Microsoft.Devices/IoTHubs', parameters('iotHubName'))).eventHubEndpoints.events.endpoint,';SharedAccessKeyName=iothubowner;SharedAccessKey=', listKeys(resourceId('Microsoft.Devices/IotHubs/Iothubkeys', parameters('iotHubName'), 'iothubowner'), '2016-02-03').primaryKey)]"
},
{
"name": "eventHubConnectionPath",
"value": "[reference(resourceId('Microsoft.Devices/IoTHubs', parameters('iotHubName'))).eventHubEndpoints.events.path]"
},
{
"name": "TWITTER_TOKEN",
"value": "{twitter bearer token}"
}
]
},
"hostNames": [
"[concat(variables('siteName'),'.azurewebsites.net')]"
],
"enabledHostNames": [
"[concat(variables('siteName'),'.azurewebsites.net')]",
"[concat(variables('siteName'),'.scm.azurewebsites.net')]"
],
"hostNameSslStates": [
{
"name": "[concat(variables('siteName'),'.azurewebsites.net')]",
"sslState": 0,
"thumbprint": null,
"ipBasedSslState": 0
},
{
"name": "[concat(variables('siteName'),'.scm.azurewebsites.net')]",
"sslState": 0,
"thumbprint": null,
"ipBasedSslState": 0
}
],
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('siteName'))]"
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('siteName'))]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]",
"[resourceId('Microsoft.Devices/IotHubs', parameters('iotHubName'))]"
],
"resources": [
{
"apiVersion": "2015-08-01",
"name": "web",
"type": "sourcecontrols",
"dependsOn": [
"[resourceId('Microsoft.Web/Sites', variables('siteName'))]"
],
"properties": {
"RepoUrl": "https://github.com/Sneezry/Riki",
"branch": "source",
"IsManualIntegration": true
}
}
]
}
]
}