1
- import { ResourceNames , IpRange , PrincipalNameAndId } from '../../types.bicep'
1
+ import { ResourceNames , IpRange , PrincipalNameAndId , PostgreSqlFlexibleServerConfig } from '../../types.bicep'
2
2
3
3
@description ('Specifies common resource naming variables.' )
4
4
param resourceNames ResourceNames
@@ -13,14 +13,8 @@ param adminName string
13
13
@secure ()
14
14
param adminPassword string
15
15
16
- @description ('SKU name.' )
17
- param sku string = 'Standard_B1ms'
18
-
19
- @description ('Storage Size in GB.' )
20
- param storageSizeGB int = 32
21
-
22
- @description ('Autogrow setting.' )
23
- param autoGrowStatus string = 'Disabled'
16
+ @description ('Server configuration.' )
17
+ param serverConfig PostgreSqlFlexibleServerConfig
24
18
25
19
@description ('Firewall rules.' )
26
20
param firewallRules IpRange [] = []
@@ -31,9 +25,6 @@ param privateEndpointSubnetId string
31
25
@description ('An array of Entra ID admin principal names for this resource' )
32
26
param entraIdAdminPrincipals PrincipalNameAndId [] = []
33
27
34
- @description ('Whether backups will be geo-redundant rather than zone-redundant' )
35
- param geoRedundantBackupEnabled bool
36
-
37
28
@description ('Whether to create or update Azure Monitor alerts during this deploy' )
38
29
param deployAlerts bool
39
30
@@ -45,7 +36,7 @@ var formattedFirewallRules = map(firewallRules, rule => {
45
36
cidr : rule .cidr
46
37
})
47
38
48
- module postgreSqlServerModule '../../components/postgresqlDatabase .bicep' = {
39
+ module postgreSqlServerModule '../../components/postgreSqlFlexibleServer .bicep' = {
49
40
name : 'postgreSQLDatabaseDeploy'
50
41
params : {
51
42
databaseServerName : resourceNames .sharedResources .postgreSqlFlexibleServer
@@ -54,14 +45,10 @@ module postgreSqlServerModule '../../components/postgresqlDatabase.bicep' = {
54
45
adminName : adminName
55
46
adminPassword : adminPassword
56
47
entraIdAdminPrincipals : entraIdAdminPrincipals
57
- dbSkuName : sku
58
- dbStorageSizeGB : storageSizeGB
59
- dbAutoGrowStatus : autoGrowStatus
60
- postgreSqlVersion : '16'
48
+ serverConfig : serverConfig
61
49
firewallRules : formattedFirewallRules
62
50
databaseNames : ['public_data' ]
63
51
privateEndpointSubnetId : privateEndpointSubnetId
64
- geoRedundantBackup : geoRedundantBackupEnabled ? 'Enabled' : 'Disabled'
65
52
alerts : deployAlerts ? {
66
53
availability : true
67
54
queryTime : true
@@ -80,17 +67,6 @@ module postgreSqlServerModule '../../components/postgresqlDatabase.bicep' = {
80
67
}
81
68
}
82
69
83
- resource maxPreparedTransactionsConfig 'Microsoft.DBforPostgreSQL/flexibleServers/configurations@2022-12-01' = {
84
- name : '${resourceNames .sharedResources .postgreSqlFlexibleServer }/max_prepared_transactions'
85
- properties : {
86
- value : '100'
87
- source : 'user-override'
88
- }
89
- dependsOn : [
90
- postgreSqlServerModule
91
- ]
92
- }
93
-
94
70
var managedIdentityConnectionStringTemplate = postgreSqlServerModule .outputs .managedIdentityConnectionStringTemplate
95
71
96
72
var dataProcessorPsqlConnectionStringSecretKey = 'ees-publicapi-data-processor-connectionstring-publicdatadb'
0 commit comments