Skip to content

Commit 1848851

Browse files
joovalstimrannayer
andauthored
feat: Backup configuration location for mssql (#775)
Co-authored-by: Imran Nayer <imrannayer@google.com>
1 parent 3d30555 commit 1848851

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

modules/mssql/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module "mssql" {
3737
| additional\_databases | A list of databases to be created in your cluster | <pre>list(object({<br> name = string<br> charset = string<br> collation = string<br> }))</pre> | `[]` | no |
3838
| 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. | <pre>list(object({<br> name = string<br> password = string<br> random_password = bool<br> }))</pre> | `[]` | no |
3939
| 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 |
40-
| backup\_configuration | The database backup configuration. | <pre>object({<br> binary_log_enabled = bool<br> enabled = bool<br> point_in_time_recovery_enabled = bool<br> start_time = string<br> transaction_log_retention_days = string<br> retained_backups = number<br> retention_unit = string<br> })</pre> | <pre>{<br> "binary_log_enabled": null,<br> "enabled": false,<br> "point_in_time_recovery_enabled": null,<br> "retained_backups": null,<br> "retention_unit": null,<br> "start_time": null,<br> "transaction_log_retention_days": null<br>}</pre> | no |
40+
| backup\_configuration | The database backup configuration. | <pre>object({<br> binary_log_enabled = bool<br> enabled = bool<br> point_in_time_recovery_enabled = bool<br> start_time = string<br> transaction_log_retention_days = string<br> retained_backups = number<br> retention_unit = string<br> location = string<br> })</pre> | <pre>{<br> "binary_log_enabled": null,<br> "enabled": false,<br> "location": null,<br> "point_in_time_recovery_enabled": null,<br> "retained_backups": null,<br> "retention_unit": null,<br> "start_time": null,<br> "transaction_log_retention_days": null<br>}</pre> | no |
4141
| connector\_enforcement | Enforce that clients use the connector library | `bool` | `false` | no |
4242
| create\_timeout | The optional timeout that is applied to limit long database creates. | `string` | `"30m"` | no |
4343
| 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 |

modules/mssql/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ resource "google_sql_database_instance" "default" {
7373
start_time = lookup(backup_configuration.value, "start_time", null)
7474
point_in_time_recovery_enabled = lookup(backup_configuration.value, "point_in_time_recovery_enabled", null)
7575
transaction_log_retention_days = lookup(backup_configuration.value, "transaction_log_retention_days", null)
76+
location = lookup(backup_configuration.value, "location", null)
7677

7778
dynamic "backup_retention_settings" {
7879
for_each = local.retained_backups != null || local.retention_unit != null ? [var.backup_configuration] : []

modules/mssql/variables.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ variable "backup_configuration" {
229229
transaction_log_retention_days = string
230230
retained_backups = number
231231
retention_unit = string
232+
location = string
232233
})
233234
default = {
234235
binary_log_enabled = null
@@ -238,6 +239,7 @@ variable "backup_configuration" {
238239
transaction_log_retention_days = null
239240
retained_backups = null
240241
retention_unit = null
242+
location = null
241243
}
242244
}
243245

0 commit comments

Comments
 (0)