Skip to content

Commit e796b3c

Browse files
saez0pubapeabodybharathkkb
authored
fix: Postgresql availability type shouldn't prevent backup configuration (#352)
fixes #351 Co-authored-by: Andrew Peabody <[email protected]> Co-authored-by: Bharath KKB <[email protected]>
1 parent b51427e commit e796b3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/postgresql/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ locals {
3232
}]
3333

3434
// HA method using REGIONAL availability_type requires point in time recovery to be enabled
35-
point_in_time_recovery_enabled = var.availability_type == "REGIONAL" ? true : lookup(var.backup_configuration, "point_in_time_recovery_enabled", false)
36-
backups_enabled = var.availability_type == "REGIONAL" ? true : lookup(var.backup_configuration, "enabled", false)
35+
point_in_time_recovery_enabled = var.availability_type == "REGIONAL" ? lookup(var.backup_configuration, "point_in_time_recovery_enabled", true) : lookup(var.backup_configuration, "point_in_time_recovery_enabled", false)
36+
backups_enabled = var.availability_type == "REGIONAL" ? lookup(var.backup_configuration, "enabled", true) : lookup(var.backup_configuration, "enabled", false)
3737

3838
retained_backups = lookup(var.backup_configuration, "retained_backups", null)
3939
retention_unit = lookup(var.backup_configuration, "retention_unit", null)

0 commit comments

Comments
 (0)