diff --git a/modules/datastore/mysql/aws-rds/1.0/variables.tf b/modules/datastore/mysql/aws-rds/1.0/variables.tf index fbd416539..b756b38fe 100644 --- a/modules/datastore/mysql/aws-rds/1.0/variables.tf +++ b/modules/datastore/mysql/aws-rds/1.0/variables.tf @@ -17,12 +17,12 @@ variable "instance" { storage_type = string read_replica_count = number }) - restore_config = object({ + restore_config = optional(object({ restore_from_backup = bool source_db_instance_identifier = optional(string) restore_master_username = optional(string) restore_master_password = optional(string) - }) + }), { restore_from_backup = false }) imports = optional(object({ import_existing = optional(bool, false) db_instance_identifier = optional(string) diff --git a/modules/datastore/mysql/flexible_server/1.0/variables.tf b/modules/datastore/mysql/flexible_server/1.0/variables.tf index 745a86c15..847f98fb8 100644 --- a/modules/datastore/mysql/flexible_server/1.0/variables.tf +++ b/modules/datastore/mysql/flexible_server/1.0/variables.tf @@ -18,13 +18,13 @@ variable "instance" { storage_tier = string read_replica_count = number }) - restore_config = object({ + restore_config = optional(object({ restore_from_backup = optional(bool) source_server_id = optional(string) restore_point_in_time = optional(string) administrator_login = optional(string) administrator_password = optional(string) - }) + }), {}) imports = optional(object({ import_existing = optional(bool, false) server_id = optional(string) diff --git a/modules/datastore/mysql/gcp-cloudsql/1.0/variables.tf b/modules/datastore/mysql/gcp-cloudsql/1.0/variables.tf index 72667c05b..35c1d948c 100644 --- a/modules/datastore/mysql/gcp-cloudsql/1.0/variables.tf +++ b/modules/datastore/mysql/gcp-cloudsql/1.0/variables.tf @@ -14,12 +14,12 @@ variable "instance" { disk_size = number read_replica_count = number }) - restore_config = object({ + restore_config = optional(object({ restore_from_backup = bool source_instance_id = optional(string) master_username = optional(string) master_password = optional(string) - }) + }), { restore_from_backup = false }) imports = optional(object({ import_existing = optional(bool, false) instance_name = optional(string) diff --git a/modules/datastore/postgres/aws-rds/1.0/variables.tf b/modules/datastore/postgres/aws-rds/1.0/variables.tf index b414459cd..527067f8d 100644 --- a/modules/datastore/postgres/aws-rds/1.0/variables.tf +++ b/modules/datastore/postgres/aws-rds/1.0/variables.tf @@ -17,12 +17,12 @@ variable "instance" { security_config = object({ deletion_protection = bool }) - restore_config = object({ + restore_config = optional(object({ restore_from_backup = bool source_db_instance_identifier = optional(string) master_username = optional(string) master_password = optional(string) - }) + }), { restore_from_backup = false }) imports = optional(object({ import_existing = optional(bool, false) db_instance_identifier = optional(string) diff --git a/modules/datastore/postgres/gcp-cloudsql/1.0/variables.tf b/modules/datastore/postgres/gcp-cloudsql/1.0/variables.tf index 17e1dc5a4..ece1555d1 100644 --- a/modules/datastore/postgres/gcp-cloudsql/1.0/variables.tf +++ b/modules/datastore/postgres/gcp-cloudsql/1.0/variables.tf @@ -14,12 +14,12 @@ variable "instance" { disk_size = number read_replica_count = number }) - restore_config = object({ + restore_config = optional(object({ restore_from_backup = bool source_instance_id = optional(string) master_username = optional(string) master_password = optional(string) - }) + }), { restore_from_backup = false }) network_config = optional(object({ ipv4_enabled = optional(bool, false) require_ssl = optional(bool, true) diff --git a/modules/datastore/redis/gcp-memorystore/1.0/variables.tf b/modules/datastore/redis/gcp-memorystore/1.0/variables.tf index 9b0397f74..aaa8c7390 100644 --- a/modules/datastore/redis/gcp-memorystore/1.0/variables.tf +++ b/modules/datastore/redis/gcp-memorystore/1.0/variables.tf @@ -15,10 +15,10 @@ variable "instance" { memory_size_gb = number tier = string }) - restore_config = object({ + restore_config = optional(object({ restore_from_backup = bool source_instance_id = optional(string) - }) + }), { restore_from_backup = false }) security = object({ enable_tls = bool })