-
Notifications
You must be signed in to change notification settings - Fork 714
/
Copy pathmain.bicep
51 lines (42 loc) · 1.43 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
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('PostGreSQL Server administrator password')
param databasePassword string
@secure()
@description('Django SECRET_KEY for securing signed data')
param secretKey string
param principalId string = ''
var resourceToken = toLower(uniqueString(subscription().id, name, location))
var tags = { 'azd-env-name': name }
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: '${name}-rg'
location: location
tags: tags
}
module resources 'resources.bicep' = {
name: 'resources'
scope: resourceGroup
params: {
name: name
location: location
resourceToken: resourceToken
tags: tags
databasePassword: databasePassword
principalId: principalId
secretKey: secretKey
}
}
output AZURE_LOCATION string = location
output APPLICATIONINSIGHTS_CONNECTION_STRING string = resources.outputs.APPLICATIONINSIGHTS_CONNECTION_STRING
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_CONFIG string = resources.outputs.WEB_APP_CONFIG