-
Notifications
You must be signed in to change notification settings - Fork 20
/
azure-main-sqls-postgres.bicep
65 lines (56 loc) · 1.67 KB
/
azure-main-sqls-postgres.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
//DELETE THIS FILE, azure-main-live-test.bicep instead
targetScope = 'subscription'
param location string
param brodcastSecret string
param firewallMyIP string
param dbAdminPassword string
resource sqlserverRG 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: 'southwind-sqlserver'
location: location
}
module containerReg 'azure-container-registry.bicep' = {
name: 'containerregistry'
scope: sqlserverRG
params: {
location: location
}
}
module sqlserverEnvironment 'azure-environment.bicep' = {
name: 'sqlserver'
params: {
suffix:'sqlserver'
dbAdminUser: 'sa-southwind'
dbFirewallMyIp: firewallMyIP
dbAdminPassword: dbAdminPassword
usePostgressDatabase: false
location: location
containerRegistryName: containerReg.outputs.containerRegistryName
containerRegistryId: containerReg.outputs.containerRegistryId
imageName: 'southwind-test'
withSlot: false
brodcastSecret: brodcastSecret
}
scope: sqlserverRG
}
resource postgreRG 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: 'southwind-postgres'
location: location
}
module postgresEnvironment 'azure-environment.bicep' = {
name: 'postgres'
params: {
suffix: 'postgres'
dbAdminUser: 'sasouthwind'
dbFirewallMyIp: firewallMyIP
dbAdminPassword: dbAdminPassword
usePostgressDatabase: true
location: location
containerRegistryName: containerReg.outputs.containerRegistryName
containerRegistryId: containerReg.outputs.containerRegistryId
imageName: 'southwind-test'
withSlot: false
brodcastSecret: brodcastSecret
}
scope: postgreRG
}
output containerRegistryName string = containerReg.outputs.containerRegistryName