Skip to content

Commit aa907bd

Browse files
authored
feat: Add location support to backup_configuration block (#126)
1 parent 2bd0f41 commit aa907bd

File tree

7 files changed

+10
-0
lines changed

7 files changed

+10
-0
lines changed

examples/mysql-ha/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ module "mysql" {
8080
enabled = true
8181
binary_log_enabled = true
8282
start_time = "20:55"
83+
location = null
8384
}
8485

8586
// Read replica configurations

examples/postgresql-ha/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ module "pg" {
7777
backup_configuration = {
7878
enabled = true
7979
start_time = "20:55"
80+
location = null
8081
}
8182

8283
// Read replica configurations

modules/mysql/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ resource "google_sql_database_instance" "default" {
5858
binary_log_enabled = local.binary_log_enabled
5959
enabled = local.backups_enabled
6060
start_time = lookup(backup_configuration.value, "start_time", null)
61+
location = lookup(backup_configuration.value, "location", null)
6162
}
6263
}
6364
dynamic "ip_configuration" {

modules/mysql/variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,13 @@ variable "backup_configuration" {
137137
binary_log_enabled = bool
138138
enabled = bool
139139
start_time = string
140+
location = string
140141
})
141142
default = {
142143
binary_log_enabled = false
143144
enabled = false
144145
start_time = null
146+
location = null
145147
}
146148
}
147149

modules/postgresql/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ resource "google_sql_database_instance" "default" {
5353
binary_log_enabled = false
5454
enabled = lookup(backup_configuration.value, "enabled", null)
5555
start_time = lookup(backup_configuration.value, "start_time", null)
56+
location = lookup(backup_configuration.value, "location", null)
5657
}
5758
}
5859
dynamic "ip_configuration" {

modules/postgresql/variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ variable "backup_configuration" {
127127
type = object({
128128
enabled = bool
129129
start_time = string
130+
location = string
130131
})
131132
default = {
132133
enabled = false
133134
start_time = null
135+
location = null
134136
}
135137
}
136138

modules/safer_mysql/variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,13 @@ variable "backup_configuration" {
141141
binary_log_enabled = bool
142142
enabled = bool
143143
start_time = string
144+
location = string
144145
})
145146
default = {
146147
binary_log_enabled = false
147148
enabled = false
148149
start_time = null
150+
location = null
149151
}
150152
}
151153

0 commit comments

Comments
 (0)