From a612108c73645b10f8981e9a7cdcb2778dcf86d6 Mon Sep 17 00:00:00 2001 From: James Gunn Date: Tue, 12 Nov 2024 11:13:22 +0000 Subject: [PATCH] Add max_slot_wal_keep_size config to dev postgres DB --- terraform/aks/config/dev.tfvars.json | 3 ++- terraform/aks/databases.tf | 7 +++++++ terraform/aks/variables.tf | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/terraform/aks/config/dev.tfvars.json b/terraform/aks/config/dev.tfvars.json index 63b3b684f..641dc520d 100644 --- a/terraform/aks/config/dev.tfvars.json +++ b/terraform/aks/config/dev.tfvars.json @@ -10,5 +10,6 @@ "run_recurring_jobs": false, "enable_logit": true, "postgres_flexible_server_sku": "GP_Standard_D2ads_v5", - "postgres_azure_storage_mb": 65536 + "postgres_azure_storage_mb": 65536, + "postgres_max_slot_wal_keep_size": 8192 } diff --git a/terraform/aks/databases.tf b/terraform/aks/databases.tf index dad83c2f9..10edc291f 100644 --- a/terraform/aks/databases.tf +++ b/terraform/aks/databases.tf @@ -56,3 +56,10 @@ resource "azurerm_postgresql_flexible_server_configuration" "hot_standby_feedbac server_id = module.postgres.azure_server_id value = "on" } + +resource "azurerm_postgresql_flexible_server_configuration" "max_slot_wal_keep_size" { + count = var.postgres_max_slot_wal_keep_size == null ? 0 : 1 + name = "max_slot_wal_keep_size" + server_id = module.postgres.azure_server_id + value = var.postgres_max_slot_wal_keep_size +} diff --git a/terraform/aks/variables.tf b/terraform/aks/variables.tf index 415a7894c..d906f2fc1 100644 --- a/terraform/aks/variables.tf +++ b/terraform/aks/variables.tf @@ -155,6 +155,11 @@ variable "app_name" { default = null } variable "app_name_suffix" { default = null } +variable "postgres_max_slot_wal_keep_size" { + type = string + default = null +} + locals { app_name_suffix = var.app_name == null ? var.environment_name : var.app_name }