-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfaModule.bicep
More file actions
100 lines (93 loc) · 2.24 KB
/
faModule.bicep
File metadata and controls
100 lines (93 loc) · 2.24 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
param faName string
param faLocation string
param faCors string
param saName string
@description('Storage Account type')
@allowed([
'Standard_LRS'
'Standard_GRS'
'Standard_RAGRS'
])
param saType string = 'Standard_LRS'
param aspName string
param aiInstrumentationKey string
param searchServiceName string
param searchIndexName string
param searchApiKey string
resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' = {
name: saName
location: faLocation
sku: {
name: saType
}
kind: 'Storage'
}
resource hostingPlan 'Microsoft.Web/serverfarms@2023-12-01' = {
name: aspName
location: faLocation
sku: {
name: 'Y1'
tier: 'Dynamic'
}
properties: {}
}
resource fa 'Microsoft.Web/sites@2023-12-01' = {
name: faName
location: faLocation
kind: 'functionapp,linux'
properties: {
serverFarmId: hostingPlan.id
httpsOnly: true
siteConfig: {
ftpsState: 'Disabled'
minTlsVersion: '1.2'
cors: {
allowedOrigins: [
faCors
]
}
appSettings: [
{
name: 'AzureWebJobsStorage'
value: 'DefaultEndpointsProtocol=https;AccountName=${saName};EndpointSuffix=${environment().suffixes.storage};AccountKey=${storageAccount.listKeys().keys[0].value}'
}
{
name: 'WEBSITE_CONTENTAZUREFILECONNECTIONSTRING'
value: 'DefaultEndpointsProtocol=https;AccountName=${saName};EndpointSuffix=${environment().suffixes.storage};AccountKey=${storageAccount.listKeys().keys[0].value}'
}
{
name: 'WEBSITE_CONTENTSHARE'
value: toLower(faName)
}
{
name: 'FUNCTIONS_EXTENSION_VERSION'
value: '~4'
}
{
name: 'WEBSITE_NODE_DEFAULT_VERSION'
value: '~20'
}
{
name: 'FUNCTIONS_WORKER_RUNTIME'
value: 'node'
}
{
name: 'APPINSIGHTS_INSTRUMENTATIONKEY'
value: aiInstrumentationKey
}
{
name: 'SearchServiceName'
value: searchServiceName
}
{
name: 'SearchIndexName'
value: searchIndexName
}
{
name: 'SearchApiKey'
value: searchApiKey
}
]
}
}
}