forked from Azure/bicep
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathres-function.bicep
More file actions
41 lines (41 loc) · 1.49 KB
/
res-function.bicep
File metadata and controls
41 lines (41 loc) · 1.49 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
// Azure Functions (v2)
resource ${1:azureFunction} 'Microsoft.Web/sites@2020-12-01' = {
name: ${2:'name'}
location: resourceGroup().location
kind: 'functionapp'
properties: {
serverFarmId: resourceId('Microsoft.Web/serverfarms', ${3:'serverFarmName'})
siteConfig: {
appSettings: [
{
name: 'AzureWebJobsDashboard'
value: 'DefaultEndpointsProtocol=https;AccountName=${4:storageAccountName1};AccountKey=${listKeys(${5:'storageAccountID1'}, '2019-06-01').key1}'
}
{
name: 'AzureWebJobsStorage'
value: 'DefaultEndpointsProtocol=https;AccountName=${6:storageAccountName2};AccountKey=${listKeys(${7:'storageAccountID2'}, '2019-06-01').key1}'
}
{
name: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING'
value: 'DefaultEndpointsProtocol=https;AccountName=${8:storageAccountName3};AccountKey=${listKeys(${9:'storageAccountID3'}, '2019-06-01').key1}'
}
{
name: 'WEBSITE_CONTENTSHARE'
value: toLower(${2:'name'})
}
{
name: 'FUNCTIONS_EXTENSION_VERSION'
value: '~2'
}
{
name: 'APPINSIGHTS_INSTRUMENTATIONKEY'
value: reference(resourceId('microsoft.insights/components/', ${10:'applicationInsightsName'}), '2015-05-01').InstrumentationKey
}
{
name: 'FUNCTIONS_WORKER_RUNTIME'
value: '${11|dotnet,node,java|}'
}
]
}
}
}