You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: `Used to block Terraform from deleting a SQL Instance. Defaults to true.`,
174
174
},
175
+
"final_backup_description": {
176
+
Type: schema.TypeString,
177
+
Optional: true,
178
+
Description: `The description of final backup if instance enable create final backup during instance deletion. `,
179
+
180
+
},
175
181
"settings": {
176
182
Type: schema.TypeList,
177
183
Optional: true,
@@ -792,6 +798,28 @@ API (for read pools, effective_availability_type may differ from availability_ty
792
798
Optional: true,
793
799
Description: `When this parameter is set to true, Cloud SQL retains backups of the instance even after the instance is deleted. The ON_DEMAND backup will be retained until customer deletes the backup or the project. The AUTOMATED backup will be retained based on the backups retention setting.`,
794
800
},
801
+
"final_backup_config": {
802
+
Type: schema.TypeList,
803
+
Optional: true,
804
+
MaxItems: 1,
805
+
Elem: &schema.Resource{
806
+
Schema: map[string]*schema.Schema{
807
+
"enabled": {
808
+
Type: schema.TypeBool,
809
+
Optional: true,
810
+
Description: `When this parameter is set to true, the final backup is enabled for the instance`,
811
+
},
812
+
"retention_days": {
813
+
Type: schema.TypeInt,
814
+
Optional: true,
815
+
ValidateFunc: validation.IntBetween(1, 36135),
816
+
Description: `The number of days to retain the final backup after the instance deletion. The valid range is between 1 and 365. For instances managed by BackupDR, the valid range is between 1 day and 99 years. The final backup will be purged at (time_of_instance_deletion + retention_days).`,
817
+
},
818
+
},
819
+
},
820
+
Description: `Config used to determine the final backup settings for the instance`,
821
+
822
+
},
795
823
},
796
824
},
797
825
Description: `The settings to use for the database. The configuration is detailed below.`,
Copy file name to clipboardExpand all lines: mmv1/third_party/terraform/website/docs/r/sql_database_instance.html.markdown
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -327,6 +327,8 @@ includes an up-to-date reference of supported versions.
327
327
or `terraform destroy` that would delete the instance will fail.
328
328
When the field is set to false, deleting the instance is allowed.
329
329
330
+
*`final_backup_description` - (Optional) The description of final backup. Only set this field when `final_backup_config.enabled` is true.
331
+
330
332
~> **NOTE:** This flag only protects instances from deletion within Terraform. To protect your instances from accidental deletion across all surfaces (API, gcloud, Cloud Console and Terraform), use the API flag `settings.deletion_protection_enabled`.
331
333
332
334
*`restore_backup_context` - (optional) The context needed to restore the database to a backup run. This field will
@@ -395,6 +397,12 @@ The `settings` block supports:
395
397
396
398
*`retain_backups_on_delete` - (Optional) When this parameter is set to true, Cloud SQL retains backups of the instance even after the instance is deleted. The `ON_DEMAND` backup will be retained until customer deletes the backup or the project. The `AUTOMATED` backup will be retained based on the backups retention setting.
397
399
400
+
The optional `final_backup_config` subblock supports:
401
+
402
+
*`enabled` - (Optional) True if enabled final backup.
403
+
404
+
*`retention_days` - (Optional) The number of days we retain the final backup after instance deletion. The valid range is between 1 and 365. For instances managed by BackupDR, the valid range is between 1 day and 99 years.
405
+
398
406
The optional `settings.advanced_machine_features` subblock supports:
399
407
400
408
*`threads_per_core` - (Optional) The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See [smt](https://cloud.google.com/sql/docs/sqlserver/create-instance#smt-create-instance) for more details.
0 commit comments