-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.bicep
95 lines (81 loc) · 2.4 KB
/
main.bicep
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
@description('Location for the resources')
param location string = resourceGroup().location
@description('Tags for all resources')
param tags object = {}
@minLength(3)
@maxLength(24)
@description('The name of the storage account')
param storageAccountName string
@minLength(3)
@maxLength(24)
@description('The name of the SFTP storage account')
param sftpStorageAccountName string
@description('The name of the application insights resource')
param applicationInsightsName string
@description('The name of the app service plan resource')
param appServicePlanName string
@description('The name of our function app resource')
param functionAppName string
@description('Name of the SKU')
@allowed([
'Standard_GRS'
'Standard_LRS'
])
param storageAccountSku string
@allowed([
'S1'
'B1'
])
param appServicePlanSku string = 'B1'
@secure()
@description('API key for our really interesting API')
param apiKey string
module storageAccount 'module/storage-account.bicep' = {
name: 'deploy-${storageAccountName}'
params: {
location: location
tags: tags
storageAccountName: storageAccountName
storageAccountSku: storageAccountSku
}
}
module sftpStorageAccount 'module/storage-account.bicep' = {
name: 'deploy-${sftpStorageAccountName}'
params: {
location: location
tags: tags
storageAccountName: sftpStorageAccountName
storageAccountSku: storageAccountSku
isSftpEnabled: true
}
}
module applicationInsights 'module/application-insight.bicep' = {
name: 'deploy-${applicationInsightsName}'
params: {
applicationInsightsName: applicationInsightsName
location: location
tags: tags
}
}
module compute 'compute.bicep' = {
name: 'deploy-compute'
params: {
apiKey: apiKey
applicationInsightsName: applicationInsightsName
appServicePlanName: appServicePlanName
functionAppName: functionAppName
appServicePlanSku: appServicePlanSku
location: location
storageAccountName: storageAccountName
tags: tags
}
dependsOn: [
storageAccount
sftpStorageAccount
]
}
output storageAccountName string = storageAccount.outputs.storageAccountName
output applicationInsightsName string = applicationInsights.outputs.applicationInsightsName
output appServicePlanName string = compute.outputs.appServicePlanName
output functionAppName string = compute.outputs.functionAppName
output appServiceDefaultHostName string = compute.outputs.appServiceDefaultHostName