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.`,
190
190
},
191
+
"final_backup_description": {
192
+
Type: schema.TypeString,
193
+
Optional: true,
194
+
Description: `The description of final backup if instance enable create final backup during instance deletion. `,
195
+
},
191
196
"settings": {
192
197
Type: schema.TypeList,
193
198
Optional: true,
@@ -806,6 +811,27 @@ API (for read pools, effective_availability_type may differ from availability_ty
806
811
Optional: true,
807
812
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.`,
808
813
},
814
+
"final_backup_config": {
815
+
Type: schema.TypeList,
816
+
Optional: true,
817
+
MaxItems: 1,
818
+
Elem: &schema.Resource{
819
+
Schema: map[string]*schema.Schema{
820
+
"enabled": {
821
+
Type: schema.TypeBool,
822
+
Optional: true,
823
+
Description: `When this parameter is set to true, the final backup is enabled for the instance`,
824
+
},
825
+
"retention_days": {
826
+
Type: schema.TypeInt,
827
+
Optional: true,
828
+
ValidateFunc: validation.IntBetween(1, 36135),
829
+
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).`,
830
+
},
831
+
},
832
+
},
833
+
Description: `Config used to determine the final backup settings for the instance`,
834
+
},
809
835
},
810
836
},
811
837
Description: `The settings to use for the database. The configuration is detailed below.`,
Copy file name to clipboardExpand all lines: 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
@@ -341,6 +341,8 @@ includes an up-to-date reference of supported versions.
341
341
or `terraform destroy` that would delete the instance will fail.
342
342
When the field is set to false, deleting the instance is allowed.
343
343
344
+
*`final_backup_description` - (Optional) The description of final backup. Only set this field when `final_backup_config.enabled` is true.
345
+
344
346
~> **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`.
345
347
346
348
*`restore_backup_context` - (optional) The context needed to restore the database to a backup run. This field will
@@ -409,6 +411,12 @@ The `settings` block supports:
409
411
410
412
*`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.
411
413
414
+
The optional `final_backup_config` subblock supports:
415
+
416
+
*`enabled` - (Optional) True if enabled final backup.
417
+
418
+
*`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.
419
+
412
420
The optional `settings.advanced_machine_features` subblock supports:
413
421
414
422
*`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