From a475c71772acef50bccded8ee1bfcfee24d8c5ee Mon Sep 17 00:00:00 2001 From: shemau Date: Wed, 6 Nov 2024 14:38:11 +0000 Subject: [PATCH 1/2] fix: remove wal_level default values and validation --- examples/complete/main.tf | 1 - solutions/standard/DA-types.md | 1 - solutions/standard/variables.tf | 1 - variables.tf | 9 +++++---- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 800d2928..3620cf63 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -123,7 +123,6 @@ module "postgresql_db" { tcp_keepalives_interval = 50 tcp_keepalives_count = 6 archive_timeout = 1000 - wal_level = "replica" max_replication_slots = 10 max_wal_senders = 20 } diff --git a/solutions/standard/DA-types.md b/solutions/standard/DA-types.md index 12c24c04..0ee307e5 100644 --- a/solutions/standard/DA-types.md +++ b/solutions/standard/DA-types.md @@ -185,7 +185,6 @@ The following example shows values for the `configuration` input. "tcp_keepalives_interval": 15, "tcp_keepalives_count": 6, "archive_timeout": 1800, - "wal_level": "replica", "max_replication_slots": 10, "max_wal_senders": 12 } diff --git a/solutions/standard/variables.tf b/solutions/standard/variables.tf index 35e9aa21..af4d7c9e 100644 --- a/solutions/standard/variables.tf +++ b/solutions/standard/variables.tf @@ -159,7 +159,6 @@ variable "configuration" { tcp_keepalives_interval = 15 tcp_keepalives_count = 6 archive_timeout = 1800 - wal_level = "replica" max_replication_slots = 10 max_wal_senders = 12 } diff --git a/variables.tf b/variables.tf index 1f74cc5e..ed057621 100644 --- a/variables.tf +++ b/variables.tf @@ -202,10 +202,11 @@ variable "configuration" { error_message = "Value for `configuration[\"archive_timeout\"]` must be 300 or more, if specified." } - validation { - condition = var.configuration != null ? (var.configuration["wal_level"] != null ? contains(["replica", "logical"], var.configuration["wal_level"]) : true) : true - error_message = "Value for `configuration[\"wal_level\"]` must be either `replica` or `logical`, if specified." - } + # skip validation for issue #508 and #512 + #validation { + # condition = var.configuration != null ? (var.configuration["wal_level"] != null ? contains(["replica", "logical"], var.configuration["wal_level"]) : true) : true + # error_message = "Value for `configuration[\"wal_level\"]` must be either `replica` or `logical`, if specified." + #} validation { condition = var.configuration != null ? (var.configuration["max_replication_slots"] != null ? var.configuration["max_replication_slots"] >= 10 : true) : true From 00073633983ba6e9211b48ed83b7324131fa205b Mon Sep 17 00:00:00 2001 From: shemau Date: Wed, 6 Nov 2024 16:00:58 +0000 Subject: [PATCH 2/2] SKIP UPGRADE TEST