From 304f4da7eae3657dc85118bbedce393d1a12d5a8 Mon Sep 17 00:00:00 2001 From: Are Almaas Date: Thu, 21 Nov 2024 15:11:42 +0100 Subject: [PATCH] Revert "feat(azure): adjust SKU and storage for yt01 and prod" This reverts commit b7e490930261ca3470a8bb7da3715529dbe9f445. --- .azure/infrastructure/main.bicep | 3 --- .azure/infrastructure/prod.bicepparam | 10 ++-------- .azure/infrastructure/staging.bicepparam | 4 ---- .azure/infrastructure/test.bicepparam | 4 ---- .azure/infrastructure/yt01.bicepparam | 8 +------- .azure/modules/postgreSql/create.bicep | 20 ++------------------ 6 files changed, 5 insertions(+), 44 deletions(-) diff --git a/.azure/infrastructure/main.bicep b/.azure/infrastructure/main.bicep index 11de7911f..2472094bb 100644 --- a/.azure/infrastructure/main.bicep +++ b/.azure/infrastructure/main.bicep @@ -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 } @@ -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 diff --git a/.azure/infrastructure/prod.bicepparam b/.azure/infrastructure/prod.bicepparam index e8d1936e7..4ab19b520 100644 --- a/.azure/infrastructure/prod.bicepparam +++ b/.azure/infrastructure/prod.bicepparam @@ -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 = { diff --git a/.azure/infrastructure/staging.bicepparam b/.azure/infrastructure/staging.bicepparam index 7d697bde0..46dcaff56 100644 --- a/.azure/infrastructure/staging.bicepparam +++ b/.azure/infrastructure/staging.bicepparam @@ -34,10 +34,6 @@ param postgresConfiguration = { name: 'Standard_B1ms' tier: 'Burstable' } - storage: { - storageSizeGB: 32 - autoGrow: 'Enabled' - } enableIndexTuning: false enableQueryPerformanceInsight: true } diff --git a/.azure/infrastructure/test.bicepparam b/.azure/infrastructure/test.bicepparam index 7483f2ce3..746ff9698 100644 --- a/.azure/infrastructure/test.bicepparam +++ b/.azure/infrastructure/test.bicepparam @@ -34,10 +34,6 @@ param postgresConfiguration = { name: 'Standard_B2s' tier: 'Burstable' } - storage: { - storageSizeGB: 32 - autoGrow: 'Enabled' - } enableIndexTuning: false enableQueryPerformanceInsight: true } diff --git a/.azure/infrastructure/yt01.bicepparam b/.azure/infrastructure/yt01.bicepparam index 8d4625564..3e36d2830 100644 --- a/.azure/infrastructure/yt01.bicepparam +++ b/.azure/infrastructure/yt01.bicepparam @@ -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 } diff --git a/.azure/modules/postgreSql/create.bicep b/.azure/modules/postgreSql/create.bicep index 9e8e16459..330a13ca2 100644 --- a/.azure/modules/postgreSql/create.bicep +++ b/.azure/modules/postgreSql/create.bicep @@ -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 @@ -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' }