Skip to content

Commit

Permalink
fix: Disable binary_logging option as it is not valid for Postgres in…
Browse files Browse the repository at this point in the history
…stances (#94)
  • Loading branch information
Akhil Nair authored Apr 24, 2020
1 parent cf87a9d commit c74b15d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
5 changes: 2 additions & 3 deletions examples/postgresql-ha/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ module "pg" {
}

backup_configuration = {
enabled = true
binary_log_enabled = false
start_time = "20:55"
enabled = true
start_time = "20:55"
}

// Read replica configurations
Expand Down
2 changes: 1 addition & 1 deletion modules/postgresql/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ resource "google_sql_database_instance" "default" {
dynamic "backup_configuration" {
for_each = [var.backup_configuration]
content {
binary_log_enabled = lookup(backup_configuration.value, "binary_log_enabled", null)
binary_log_enabled = false
enabled = lookup(backup_configuration.value, "enabled", null)
start_time = lookup(backup_configuration.value, "start_time", null)
}
Expand Down
11 changes: 4 additions & 7 deletions modules/postgresql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -119,18 +119,15 @@ variable "user_labels" {
variable "backup_configuration" {
description = "The backup_configuration settings subblock for the database setings"
type = object({
binary_log_enabled = bool
enabled = bool
start_time = string
enabled = bool
start_time = string
})
default = {
binary_log_enabled = null
enabled = false
start_time = null
enabled = false
start_time = null
}
}


variable "authorized_gae_applications" {
description = "The authorized gae applications for the Cloud SQL instances"
type = list(string)
Expand Down

0 comments on commit c74b15d

Please sign in to comment.