-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
Copy pathmain.bicep
45 lines (37 loc) · 1.34 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
targetScope = 'subscription'
@minLength(1)
@maxLength(64)
@description('Name which is used to generate a short unique hash for each resource')
param name string
@minLength(1)
@description('Primary location for all resources')
param location string
@secure()
@description('SQL Server administrator password')
param databasePassword string
param principalId string = ''
var resourceToken = toLower(uniqueString(subscription().id, name, location))
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: '${name}_group'
location: location
tags: { 'azd-env-name': name }
}
module resources 'resources.bicep' = {
name: 'resources'
scope: resourceGroup
params: {
name: name
location: location
resourceToken: resourceToken
databasePassword: databasePassword
principalId: principalId
}
}
output AZURE_LOCATION string = location
output WEB_URI string = resources.outputs.WEB_URI
output CONNECTION_SETTINGS array = resources.outputs.CONNECTION_SETTINGS
output WEB_APP_LOG_STREAM string = resources.outputs.WEB_APP_LOG_STREAM
output WEB_APP_SSH string = resources.outputs.WEB_APP_SSH
output WEB_APP_CONNECTIONSTRINGS string = resources.outputs.WEB_APP_CONNECTIONSTRINGS
output WEB_APP_APPSETTINGS string = resources.outputs.WEB_APP_APPSETTINGS
output AZURE_KEY_VAULT_NAME string = resources.outputs.AZURE_KEY_VAULT_NAME