Skip to content

Commit b7e4909

Browse files
committed
feat(azure): adjust SKU and storage for yt01 and prod
1 parent 9cd6385 commit b7e4909

File tree

6 files changed

+44
-5
lines changed

6 files changed

+44
-5
lines changed

.azure/infrastructure/main.bicep

+3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ import { Sku as SlackNotifierSku } from '../modules/functionApp/slackNotifier.bi
5555
param slackNotifierSku SlackNotifierSku
5656

5757
import { Sku as PostgresSku } from '../modules/postgreSql/create.bicep'
58+
import { StorageConfiguration as PostgresStorageConfig } from '../modules/postgreSql/create.bicep'
5859

5960
param postgresConfiguration {
6061
sku: PostgresSku
62+
storage: PostgresStorageConfig
6163
enableIndexTuning: bool
6264
enableQueryPerformanceInsight: bool
6365
}
@@ -215,6 +217,7 @@ module postgresql '../modules/postgreSql/create.bicep' = {
215217
? srcKeyVaultResource.getSecret('dialogportenPgAdminPassword${environment}')
216218
: secrets.dialogportenPgAdminPassword
217219
sku: postgresConfiguration.sku
220+
storage: postgresConfiguration.storage
218221
appInsightWorkspaceName: appInsights.outputs.appInsightsWorkspaceName
219222
enableIndexTuning: postgresConfiguration.enableIndexTuning
220223
enableQueryPerformanceInsight: postgresConfiguration.enableQueryPerformanceInsight

.azure/infrastructure/prod.bicepparam

+8-2
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,17 @@ param slackNotifierSku = {
3131
}
3232
param postgresConfiguration = {
3333
sku: {
34-
name: 'Standard_D4ads_v5'
34+
name: 'Standard_D8ads_v5'
3535
tier: 'GeneralPurpose'
3636
}
37-
enableQueryPerformanceInsight: false
37+
storage: {
38+
storageSizeGB: 256
39+
iops: 1100
40+
autoGrow: 'Enabled'
41+
tier: 'Premium'
42+
}
3843
enableIndexTuning: false
44+
enableQueryPerformanceInsight: false
3945
}
4046

4147
param redisSku = {

.azure/infrastructure/staging.bicepparam

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ param postgresConfiguration = {
3434
name: 'Standard_B1ms'
3535
tier: 'Burstable'
3636
}
37+
storage: {
38+
storageSizeGB: 32
39+
autoGrow: 'Enabled'
40+
}
3741
enableIndexTuning: false
3842
enableQueryPerformanceInsight: true
3943
}

.azure/infrastructure/test.bicepparam

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ param postgresConfiguration = {
3434
name: 'Standard_B2s'
3535
tier: 'Burstable'
3636
}
37+
storage: {
38+
storageSizeGB: 32
39+
autoGrow: 'Enabled'
40+
}
3741
enableIndexTuning: false
3842
enableQueryPerformanceInsight: true
3943
}

.azure/infrastructure/yt01.bicepparam

+7-1
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@ param slackNotifierSku = {
3131
}
3232
param postgresConfiguration = {
3333
sku: {
34-
name: 'Standard_D4ads_v5'
34+
name: 'Standard_D8ads_v5'
3535
tier: 'GeneralPurpose'
3636
}
37+
storage: {
38+
storageSizeGB: 256
39+
iops: 1100
40+
autoGrow: 'Enabled'
41+
tier: 'Premium'
42+
}
3743
enableIndexTuning: true
3844
enableQueryPerformanceInsight: true
3945
}

.azure/modules/postgreSql/create.bicep

+18-2
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,24 @@ param tags object
2424

2525
@export()
2626
type Sku = {
27-
name: 'Standard_B1ms' | 'Standard_B2s' | 'Standard_B4ms' | 'Standard_B8ms' | 'Standard_B12ms' | 'Standard_B16ms' | 'Standard_B20ms' | 'Standard_D4ads_v5'
27+
name: 'Standard_B1ms' | 'Standard_B2s' | 'Standard_B4ms' | 'Standard_B8ms' | 'Standard_B12ms' | 'Standard_B16ms' | 'Standard_B20ms' | 'Standard_D4ads_v5' | 'Standard_D8ads_v5'
2828
tier: 'Burstable' | 'GeneralPurpose' | 'MemoryOptimized'
2929
}
3030

3131
@description('The SKU of the PostgreSQL server')
3232
param sku Sku
3333

34+
@export()
35+
type StorageConfiguration = {
36+
storageSizeGB: int
37+
iops: int?
38+
autoGrow: 'Enabled' | 'Disabled'
39+
tier: 'Premium'? // For burstable skus, this is not supported
40+
}
41+
42+
@description('The storage configuration for the PostgreSQL server')
43+
param storage StorageConfiguration
44+
3445
@description('Enable query performance insight')
3546
param enableQueryPerformanceInsight bool
3647

@@ -94,7 +105,12 @@ resource postgres 'Microsoft.DBforPostgreSQL/flexibleServers@2024-08-01' = {
94105
version: '15'
95106
administratorLogin: administratorLogin
96107
administratorLoginPassword: administratorLoginPassword
97-
storage: { storageSizeGB: 32 }
108+
storage: {
109+
storageSizeGB: storage.storageSizeGB
110+
autoGrow: storage.autoGrow
111+
iops: storage.iops
112+
tier: storage.tier
113+
}
98114
dataEncryption: {
99115
type: 'SystemManaged'
100116
}

0 commit comments

Comments
 (0)