This repository has been archived by the owner on Aug 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
main.bicep
55 lines (51 loc) · 1.64 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
param keyVaultName string
param sqlServerName string
@secure()
param sqlServerAdminPassword string
param applicationInsightsName string
param logAnalyticsWorkspaceName string
param webAppHostingPlanName string
param webAppName string
var sqlServerAdminName = 'azure_dba'
var sqlDatabaseName = 'webapidb'
module monitoring './webapi/monitoring.bicep' = {
name: 'monitoring_deploy'
params: {
logAnalyticsWorkspaceName: logAnalyticsWorkspaceName
applicationInsightsName: applicationInsightsName
}
}
module db './webapi/db.bicep' = {
name: 'db_deploy'
params: {
sqlServerName: sqlServerName
sqlDatabaseName: sqlDatabaseName
sqlServerAdminName: sqlServerAdminName
sqlServerAdminPassword: sqlServerAdminPassword
logAnalyticsWorkspaceId: monitoring.outputs.logAnalyticsWorkspaceId
}
}
module webapp './webapi/webapp.bicep' = {
name: 'webapp_deploy'
params: {
webAppHostingPlanName: webAppHostingPlanName
webAppName: webAppName
appInsightsInstrumentationKey: monitoring.outputs.appInsightsInstrumentationKey
keyVaultName: keyVaultName
logAnalyticsWorkspaceId: monitoring.outputs.logAnalyticsWorkspaceId
}
}
module secrets './webapi/secrets.bicep' = {
name: 'secrets_deploy'
params: {
keyVaultName: keyVaultName
webAppPrincipalId: webapp.outputs.webAppPrincipalId
sqlServerFQDN: db.outputs.sqlServerFQDN
sqlDatabaseName: sqlDatabaseName
sqlServerAdminName: sqlServerAdminName
sqlServerAdminPassword: sqlServerAdminPassword
logAnalyticsWorkspaceId: monitoring.outputs.logAnalyticsWorkspaceId
}
}
output webAppName string = webAppName
output sqlDatabaseName string = sqlDatabaseName