Skip to content

Commit

Permalink
fix: Don't define backup_configuration if default DB is configured as…
Browse files Browse the repository at this point in the history
… a replica (#559)

Co-authored-by: Imran Nayer <imrannayer@google.com>
  • Loading branch information
OscarVanL and imrannayer committed Dec 25, 2023
1 parent 00c0b7e commit 52224ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/mysql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ resource "google_sql_database_instance" "default" {
connector_enforcement = local.connector_enforcement

dynamic "backup_configuration" {
for_each = [var.backup_configuration]
for_each = var.master_instance_name != null ? [] : [var.backup_configuration]
content {
binary_log_enabled = local.binary_log_enabled
enabled = local.backups_enabled
Expand Down

0 comments on commit 52224ad

Please sign in to comment.