diff --git a/modules/mssql/README.md b/modules/mssql/README.md index 4b977b8f..dae123d2 100644 --- a/modules/mssql/README.md +++ b/modules/mssql/README.md @@ -37,7 +37,7 @@ module "mssql" { | additional\_databases | A list of databases to be created in your cluster |
list(object({
name = string
charset = string
collation = string
})) | `[]` | no |
| additional\_users | A list of users to be created in your cluster. A random password would be set for the user if the `random_password` variable is set. | list(object({
name = string
password = string
random_password = bool
})) | `[]` | no |
| availability\_type | The availability type for the Cloud SQL instance.This is only used to set up high availability for the MSSQL instance. Can be either `ZONAL` or `REGIONAL`. | `string` | `"ZONAL"` | no |
-| backup\_configuration | The database backup configuration. | object({
binary_log_enabled = bool
enabled = bool
point_in_time_recovery_enabled = bool
start_time = string
transaction_log_retention_days = string
retained_backups = number
retention_unit = string
}) | {
"binary_log_enabled": null,
"enabled": false,
"point_in_time_recovery_enabled": null,
"retained_backups": null,
"retention_unit": null,
"start_time": null,
"transaction_log_retention_days": null
} | no |
+| backup\_configuration | The database backup configuration. | object({
binary_log_enabled = bool
enabled = bool
point_in_time_recovery_enabled = bool
start_time = string
transaction_log_retention_days = string
retained_backups = number
retention_unit = string
location = string
}) | {
"binary_log_enabled": null,
"enabled": false,
"location": null,
"point_in_time_recovery_enabled": null,
"retained_backups": null,
"retention_unit": null,
"start_time": null,
"transaction_log_retention_days": null
} | no |
| connector\_enforcement | Enforce that clients use the connector library | `bool` | `false` | no |
| create\_timeout | The optional timeout that is applied to limit long database creates. | `string` | `"30m"` | no |
| data\_cache\_enabled | Whether data cache is enabled for the instance. Defaults to false. Feature is only available for ENTERPRISE\_PLUS tier and supported database\_versions | `bool` | `false` | no |
diff --git a/modules/mssql/main.tf b/modules/mssql/main.tf
index c5756c6a..002fea13 100644
--- a/modules/mssql/main.tf
+++ b/modules/mssql/main.tf
@@ -73,6 +73,7 @@ resource "google_sql_database_instance" "default" {
start_time = lookup(backup_configuration.value, "start_time", null)
point_in_time_recovery_enabled = lookup(backup_configuration.value, "point_in_time_recovery_enabled", null)
transaction_log_retention_days = lookup(backup_configuration.value, "transaction_log_retention_days", null)
+ location = lookup(backup_configuration.value, "location", null)
dynamic "backup_retention_settings" {
for_each = local.retained_backups != null || local.retention_unit != null ? [var.backup_configuration] : []
diff --git a/modules/mssql/variables.tf b/modules/mssql/variables.tf
index fb1ddf98..7254e458 100644
--- a/modules/mssql/variables.tf
+++ b/modules/mssql/variables.tf
@@ -229,6 +229,7 @@ variable "backup_configuration" {
transaction_log_retention_days = string
retained_backups = number
retention_unit = string
+ location = string
})
default = {
binary_log_enabled = null
@@ -238,6 +239,7 @@ variable "backup_configuration" {
transaction_log_retention_days = null
retained_backups = null
retention_unit = null
+ location = null
}
}