Skip to content

Commit c74b15d

Browse files
author
Akhil Nair
authored
fix: Disable binary_logging option as it is not valid for Postgres instances (#94)
1 parent cf87a9d commit c74b15d

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

examples/postgresql-ha/main.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,8 @@ module "pg" {
7878
}
7979

8080
backup_configuration = {
81-
enabled = true
82-
binary_log_enabled = false
83-
start_time = "20:55"
81+
enabled = true
82+
start_time = "20:55"
8483
}
8584

8685
// Read replica configurations

modules/postgresql/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ resource "google_sql_database_instance" "default" {
3939
dynamic "backup_configuration" {
4040
for_each = [var.backup_configuration]
4141
content {
42-
binary_log_enabled = lookup(backup_configuration.value, "binary_log_enabled", null)
42+
binary_log_enabled = false
4343
enabled = lookup(backup_configuration.value, "enabled", null)
4444
start_time = lookup(backup_configuration.value, "start_time", null)
4545
}

modules/postgresql/variables.tf

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,15 @@ variable "user_labels" {
119119
variable "backup_configuration" {
120120
description = "The backup_configuration settings subblock for the database setings"
121121
type = object({
122-
binary_log_enabled = bool
123-
enabled = bool
124-
start_time = string
122+
enabled = bool
123+
start_time = string
125124
})
126125
default = {
127-
binary_log_enabled = null
128-
enabled = false
129-
start_time = null
126+
enabled = false
127+
start_time = null
130128
}
131129
}
132130

133-
134131
variable "authorized_gae_applications" {
135132
description = "The authorized gae applications for the Cloud SQL instances"
136133
type = list(string)

0 commit comments

Comments
 (0)