Skip to content

Commit ad7e8d4

Browse files
authored
Fix logic for conditional backup location (#13)
1 parent 2be38e0 commit ad7e8d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

instance.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ resource "google_sql_database_instance" "instance" {
1919
enabled = coalesce(var.backup_config.enabled, var.highly_available)
2020
start_time = var.backup_config.start_time
2121
point_in_time_recovery_enabled = var.backup_config.point_in_time_recovery_enabled
22-
location = var.backup_config.enabled == true ? var.backup_config.location : null
22+
location = coalesce(var.backup_config.enabled, var.highly_available) ? var.backup_config.location : null
2323
transaction_log_retention_days = var.backup_config.transaction_log_retention_days
2424
backup_retention_settings {
2525
retained_backups = var.backup_config.retained_backups

0 commit comments

Comments
 (0)