Add support for point_in_time_recovery in backup settings
This commit is contained in:
parent
1fc8e81d14
commit
d00f3ee0cb
|
@ -88,6 +88,7 @@ resource "google_sql_database_instance" "primary" {
|
|||
)
|
||||
start_time = var.backup_configuration.start_time
|
||||
location = var.backup_configuration.location
|
||||
point_in_time_recovery_enabled = var.backup_configuration.point_in_time_recovery_enabled
|
||||
transaction_log_retention_days = var.backup_configuration.log_retention_days
|
||||
backup_retention_settings {
|
||||
retained_backups = var.backup_configuration.retention_count
|
||||
|
|
|
@ -38,20 +38,22 @@ variable "availability_type" {
|
|||
variable "backup_configuration" {
|
||||
description = "Backup settings for primary instance. Will be automatically enabled if using MySQL with one or more replicas."
|
||||
type = object({
|
||||
enabled = bool
|
||||
binary_log_enabled = bool
|
||||
start_time = string
|
||||
location = string
|
||||
log_retention_days = number
|
||||
retention_count = number
|
||||
enabled = bool
|
||||
binary_log_enabled = bool
|
||||
start_time = string
|
||||
location = string
|
||||
log_retention_days = number
|
||||
point_in_time_recovery_enabled = bool
|
||||
retention_count = number
|
||||
})
|
||||
default = {
|
||||
enabled = false
|
||||
binary_log_enabled = false
|
||||
start_time = "23:00"
|
||||
location = null
|
||||
log_retention_days = 7
|
||||
retention_count = 7
|
||||
enabled = false
|
||||
binary_log_enabled = false
|
||||
start_time = "23:00"
|
||||
location = null
|
||||
log_retention_days = 7
|
||||
point_in_time_recovery_enabled = null
|
||||
retention_count = 7
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue