1
1
{
2
- "$schema" : " https://schema.management.azure.com/schemas/2015-01 -01/deploymentTemplate.json#" ,
2
+ "$schema" : " https://schema.management.azure.com/schemas/2019-04 -01/deploymentTemplate.json#" ,
3
3
"contentVersion" : " 1.0.0.0" ,
4
4
"parameters" : {
5
5
"functionsAppName" : {
112
112
{
113
113
"type" : " Microsoft.Web/serverfarms" ,
114
114
"name" : " [variables('hostingPlanName')]" ,
115
- "apiVersion" : " 2015-08 -01" ,
115
+ "apiVersion" : " 2020-06 -01" ,
116
116
"location" : " [resourceGroup().location]" ,
117
117
"comments" : " This hosting plan is created to deploy the function app and set the billing sku tier" ,
118
118
"sku" : {
119
119
"name" : " Y1" ,
120
- "tier" : " Dynamic" ,
121
- "size" : " Y1" ,
122
- "family" : " Y" ,
123
- "capacity" : 0
120
+ "tier" : " Dynamic"
124
121
},
125
- "kind" : " functionapp" ,
126
122
"properties" : {
127
123
"name" : " [variables('hostingPlanName')]" ,
128
- "computeMode" : " 0 "
124
+ "computeMode" : " Dynamic "
129
125
}
130
126
},
131
127
{
132
128
"type" : " Microsoft.Web/sites" ,
133
129
"name" : " [variables('functionsAppName')]" ,
134
- "apiVersion" : " 2015-08 -01" ,
130
+ "apiVersion" : " 2020-06 -01" ,
135
131
"location" : " [resourceGroup().location]" ,
136
132
"comments" : " This function app depends on the media services account and storage account and will pull down the source code from Github" ,
137
133
"dependsOn" : [
143
139
"serverFarmId" : " [variables('hostingPlanName')]" ,
144
140
"siteConfig" : {
145
141
"appSettings" : [
142
+ {
143
+ "name" : " AzureWebJobsStorage" ,
144
+ "value" : " [concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';EndpointSuffix=', environment().suffixes.storage, ';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2019-06-01').keys[0].value)]"
145
+ },
146
+ {
147
+ "name" : " WEBSITE_CONTENTAZUREFILECONNECTIONSTRING" ,
148
+ "value" : " [concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';EndpointSuffix=', environment().suffixes.storage, ';AccountKey=',listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), '2019-06-01').keys[0].value)]"
149
+ },
150
+ {
151
+ "name" : " WEBSITE_CONTENTSHARE" ,
152
+ "value" : " [toLower(variables('functionsAppName'))]"
153
+ },
146
154
{
147
155
"name" : " FUNCTIONS_EXTENSION_VERSION" ,
148
- "value" : " beta"
156
+ "value" : " ~3"
157
+ },
158
+ {
159
+ "name" : " WEBSITE_NODE_DEFAULT_VERSION" ,
160
+ "value" : " ~10"
161
+ },
162
+ {
163
+ "name" : " FUNCTIONS_WORKER_RUNTIME" ,
164
+ "value" : " dotnet"
165
+ },
166
+ {
167
+ "name" : " Project" ,
168
+ "value" : " [parameters('project')]"
169
+ },
170
+ {
171
+ "name" : " SubscriptionId" ,
172
+ "value" : " [parameters('mediaServicesAccountSubscriptionId')]"
173
+ },
174
+ {
175
+ "name" : " Region" ,
176
+ "value" : " [parameters('mediaServicesAccountRegion')]"
177
+ },
178
+ {
179
+ "name" : " ResourceGroup" ,
180
+ "value" : " [parameters('mediaServicesAccountResourceGroup')]"
181
+ },
182
+ {
183
+ "name" : " AccountName" ,
184
+ "value" : " [parameters('mediaServicesAccountName')]"
185
+ },
186
+ {
187
+ "name" : " AadClientId" ,
188
+ "value" : " [parameters('mediaServicesAccountServicePrincipalClientId')]"
189
+ },
190
+ {
191
+ "name" : " AadClientSecret" ,
192
+ "value" : " [parameters('mediaServicesAccountServicePrincipalClientSecret')]"
193
+ },
194
+ {
195
+ "name" : " AadEndpoint" ,
196
+ "value" : " https://login.microsoftonline.com"
197
+ },
198
+ {
199
+ "name" : " AadTenantId" ,
200
+ "value" : " [parameters('mediaServicesAccountAzureActiveDirectoryTenantId')]"
201
+ },
202
+ {
203
+ "name" : " ArmEndpoint" ,
204
+ "value" : " https://management.azure.com/"
205
+ },
206
+ {
207
+ "name" : " ArmAadAudience" ,
208
+ "value" : " https://management.core.windows.net/"
209
+ },
210
+ {
211
+ "name" : " StorageConnection" ,
212
+ "value" : " [concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2019-06-01').keys[0].value)]"
213
+ },
214
+ {
215
+ "name" : " SigningKey" ,
216
+ "value" : " wOlDEUJ4/VN1No8HxVxpsRvej0DZrO5DXvImGLjFhfctPGFiMkUA0Cj8HSfJW7lePX9XsfHAMhw30p0yYqG+1A=="
217
+ },
218
+ {
219
+ "name" : " WebHookEndpoint" ,
220
+ "value" : " [concat(resourceId('Microsoft.Web/sites', variables('functionsAppName')),'/api/Notification_Webhook_Function?code=', parameters('functionKey'))]"
149
221
}
150
222
]
151
223
}
152
224
},
153
225
"resources" : [
154
- {
155
- "type" : " config" ,
156
- "name" : " appsettings" ,
157
- "apiVersion" : " 2015-08-01" ,
158
- "comments" : " These are the default appsettings configured on the functions app." ,
159
- "dependsOn" : [
160
- " [resourceId('Microsoft.Web/serverfarms', variables('hostingPlanName'))]" ,
161
- " [resourceId('Microsoft.Web/Sites', variables('functionsAppName'))]" ,
162
- " [resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]"
163
- ],
164
- "properties" : {
165
- "Project" : " [parameters('project')]" ,
166
- "FUNCTIONS_WORKER_RUNTIME" : " dotnet" ,
167
- "FUNCTIONS_EXTENSION_VERSION" : " ~2" ,
168
- "WEBSITE_NODE_DEFAULT_VERSION" : " 10.14.1" ,
169
- "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING" : " [concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]" ,
170
- "WEBSITE_CONTENTSHARE" : " [variables('functionsAppName')]" ,
171
- "AzureWebJobsStorage" : " [concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]" ,
172
- "AzureWebJobsDashboard" : " [concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]" ,
173
- "SubscriptionId" : " [parameters('mediaServicesAccountSubscriptionId')]" ,
174
- "Region" : " [parameters('mediaServicesAccountRegion')]" ,
175
- "ResourceGroup" : " [parameters('mediaServicesAccountResourceGroup')]" ,
176
- "AccountName" : " [parameters('mediaServicesAccountName')]" ,
177
- "AadClientId" : " [parameters('mediaServicesAccountServicePrincipalClientId')]" ,
178
- "AadClientSecret" : " [parameters('mediaServicesAccountServicePrincipalClientSecret')]" ,
179
- "AadEndpoint" : " https://login.microsoftonline.com" ,
180
- "AadTenantId" : " [parameters('mediaServicesAccountAzureActiveDirectoryTenantId')]" ,
181
- "ArmEndpoint" : " https://management.azure.com/" ,
182
- "ArmAadAudience" : " https://management.core.windows.net/" ,
183
- "StorageConnection" : " [concat('DefaultEndpointsProtocol=https;AccountName=', variables('storageAccountName'), ';AccountKey=', listKeys(variables('storageAccountid'),'2015-05-01-preview').key1)]" ,
184
- "SigningKey" : " wOlDEUJ4/VN1No8HxVxpsRvej0DZrO5DXvImGLjFhfctPGFiMkUA0Cj8HSfJW7lePX9XsfHAMhw30p0yYqG+1A==" ,
185
- "WebHookEndpoint" : " [concat(resourceId('Microsoft.Web/sites', variables('functionsAppName')),'/api/Notification_Webhook_Function?code=', parameters('functionKey'))]"
186
- }
187
- },
188
226
{
189
227
"type" : " sourcecontrols" ,
190
228
"name" : " web" ,
191
- "apiVersion" : " 2015 -08-01" ,
229
+ "apiVersion" : " 2019 -08-01" ,
192
230
"comments" : " This section sets up source control for continuous integration on the Function app and pulls the source code down from Github." ,
193
231
"dependsOn" : [
194
232
" [resourceId('Microsoft.Web/sites', variables('functionsAppName'))]" ,
195
233
" [concat('Microsoft.Web/sites/', variables('functionsAppName'), '/config/appsettings')]"
196
234
],
197
235
"properties" : {
198
- "RepoUrl " : " [parameters('sourceCodeRepositoryURL')]" ,
236
+ "repoUrl " : " [parameters('sourceCodeRepositoryURL')]" ,
199
237
"branch" : " [parameters('sourceCodeBranch')]" ,
200
238
"IsManualIntegration" : " true"
201
239
}
204
242
}
205
243
],
206
244
"outputs" : {}
207
- }
245
+ }
0 commit comments