Skip to content

Commit

Permalink
Revert "feat(azure): adjust SKU and storage for yt01 and prod"
Browse files Browse the repository at this point in the history
This reverts commit b7e4909.
  • Loading branch information
arealmaas committed Nov 21, 2024
1 parent b7e4909 commit 304f4da
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 44 deletions.
3 changes: 0 additions & 3 deletions .azure/infrastructure/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ import { Sku as SlackNotifierSku } from '../modules/functionApp/slackNotifier.bi
param slackNotifierSku SlackNotifierSku

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

param postgresConfiguration {
sku: PostgresSku
storage: PostgresStorageConfig
enableIndexTuning: bool
enableQueryPerformanceInsight: bool
}
Expand Down Expand Up @@ -217,7 +215,6 @@ module postgresql '../modules/postgreSql/create.bicep' = {
? srcKeyVaultResource.getSecret('dialogportenPgAdminPassword${environment}')
: secrets.dialogportenPgAdminPassword
sku: postgresConfiguration.sku
storage: postgresConfiguration.storage
appInsightWorkspaceName: appInsights.outputs.appInsightsWorkspaceName
enableIndexTuning: postgresConfiguration.enableIndexTuning
enableQueryPerformanceInsight: postgresConfiguration.enableQueryPerformanceInsight
Expand Down
10 changes: 2 additions & 8 deletions .azure/infrastructure/prod.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,11 @@ param slackNotifierSku = {
}
param postgresConfiguration = {
sku: {
name: 'Standard_D8ads_v5'
name: 'Standard_D4ads_v5'
tier: 'GeneralPurpose'
}
storage: {
storageSizeGB: 256
iops: 1100
autoGrow: 'Enabled'
tier: 'Premium'
}
enableIndexTuning: false
enableQueryPerformanceInsight: false
enableIndexTuning: false
}

param redisSku = {
Expand Down
4 changes: 0 additions & 4 deletions .azure/infrastructure/staging.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ param postgresConfiguration = {
name: 'Standard_B1ms'
tier: 'Burstable'
}
storage: {
storageSizeGB: 32
autoGrow: 'Enabled'
}
enableIndexTuning: false
enableQueryPerformanceInsight: true
}
Expand Down
4 changes: 0 additions & 4 deletions .azure/infrastructure/test.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ param postgresConfiguration = {
name: 'Standard_B2s'
tier: 'Burstable'
}
storage: {
storageSizeGB: 32
autoGrow: 'Enabled'
}
enableIndexTuning: false
enableQueryPerformanceInsight: true
}
Expand Down
8 changes: 1 addition & 7 deletions .azure/infrastructure/yt01.bicepparam
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,9 @@ param slackNotifierSku = {
}
param postgresConfiguration = {
sku: {
name: 'Standard_D8ads_v5'
name: 'Standard_D4ads_v5'
tier: 'GeneralPurpose'
}
storage: {
storageSizeGB: 256
iops: 1100
autoGrow: 'Enabled'
tier: 'Premium'
}
enableIndexTuning: true
enableQueryPerformanceInsight: true
}
Expand Down
20 changes: 2 additions & 18 deletions .azure/modules/postgreSql/create.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,13 @@ param tags object

@export()
type Sku = {
name: 'Standard_B1ms' | 'Standard_B2s' | 'Standard_B4ms' | 'Standard_B8ms' | 'Standard_B12ms' | 'Standard_B16ms' | 'Standard_B20ms' | 'Standard_D4ads_v5' | 'Standard_D8ads_v5'
name: 'Standard_B1ms' | 'Standard_B2s' | 'Standard_B4ms' | 'Standard_B8ms' | 'Standard_B12ms' | 'Standard_B16ms' | 'Standard_B20ms' | 'Standard_D4ads_v5'
tier: 'Burstable' | 'GeneralPurpose' | 'MemoryOptimized'
}

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

@export()
type StorageConfiguration = {
storageSizeGB: int
iops: int?
autoGrow: 'Enabled' | 'Disabled'
tier: 'Premium'? // For burstable skus, this is not supported
}

@description('The storage configuration for the PostgreSQL server')
param storage StorageConfiguration

@description('Enable query performance insight')
param enableQueryPerformanceInsight bool

Expand Down Expand Up @@ -105,12 +94,7 @@ resource postgres 'Microsoft.DBforPostgreSQL/flexibleServers@2024-08-01' = {
version: '15'
administratorLogin: administratorLogin
administratorLoginPassword: administratorLoginPassword
storage: {
storageSizeGB: storage.storageSizeGB
autoGrow: storage.autoGrow
iops: storage.iops
tier: storage.tier
}
storage: { storageSizeGB: 32 }
dataEncryption: {
type: 'SystemManaged'
}
Expand Down

0 comments on commit 304f4da

Please sign in to comment.