File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -70,10 +70,10 @@ resource "google_sql_database_instance" "default" {
7070 connector_enforcement = local. connector_enforcement
7171
7272 dynamic "backup_configuration" {
73- for_each = var . master_instance_name != null ? [] : [var . backup_configuration ]
73+ for_each = [var . backup_configuration ]
7474 content {
7575 binary_log_enabled = local. binary_log_enabled
76- enabled = local. backups_enabled
76+ enabled = local. backups_enabled && var . master_instance_name == null ? true : false
7777 start_time = lookup (backup_configuration. value , " start_time" , null )
7878 location = lookup (backup_configuration. value , " location" , null )
7979 transaction_log_retention_days = lookup (backup_configuration. value , " transaction_log_retention_days" , null )
You can’t perform that action at this time.
0 commit comments