diff --git a/terraform/application/database.tf b/terraform/application/database.tf index 25dc1ed..a2f3c32 100644 --- a/terraform/application/database.tf +++ b/terraform/application/database.tf @@ -11,5 +11,5 @@ module "postgres" { use_azure = var.deploy_azure_backing_services azure_enable_monitoring = var.enable_monitoring azure_enable_backup_storage = var.enable_postgres_backup_storage - server_version = "16" + server_version = var.postgres_server_version } diff --git a/terraform/application/variables.tf b/terraform/application/variables.tf index fed85b8..3abad58 100644 --- a/terraform/application/variables.tf +++ b/terraform/application/variables.tf @@ -45,6 +45,11 @@ variable "enable_postgres_backup_storage" { default = false description = "Create a storage account to store database dumps" } +variable "postgres_server_version" { + type = string + description = "Version of PostgreSQL to use for PostgreSQL flexible server" + default = "18" +} variable "docker_image" { type = string description = "Docker image full name to identify it in the registry. Includes docker registry, repository and tag e.g.: ghcr.io/dfe-digital/teacher-pay-calculator:673f6309fd0c907014f44d6732496ecd92a2bcd0"