Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
1 change: 0 additions & 1 deletion solutions/standard/DA-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
1 change: 0 additions & 1 deletion solutions/standard/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
9 changes: 5 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest to link to #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
Expand Down