-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azurerm_mssql_managed_database
- support for retention policies
#20845
Changes from 1 commit
35795ad
5d666ea
63b0499
b8fdd02
af13d94
25221c4
04fcf03
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -61,8 +61,21 @@ The following arguments are supported: | |||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
* `managed_instance_id` - (Required) The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
* `long_term_retention_policy` - (Optional) A `long_term_retention_policy` block as defined below. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
* `short_term_retention_days` - (Optional) The backup retention period in days. This is how many days Point-in-Time Restore will be supported. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
--- | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
A `long_term_retention_policy` block supports the following: | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
* `weekly_retention` - (Optional) The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. `P1Y`, `P1M`, `P1W` or `P7D`. | ||||||||||||||||||||||||||||
* `monthly_retention` - (Optional) The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. `P1Y`, `P1M`, `P4W` or `P30D`. | ||||||||||||||||||||||||||||
* `yearly_retention` - (Optional) The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. `P1Y`, `P12M`, `P52W` or `P365D`. | ||||||||||||||||||||||||||||
Comment on lines
+72
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should these be
Suggested change
or even this as retention is in the block name?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've named them this way to keep them consistent with the equivalent in azurerm_mssql_database: terraform-provider-azurerm/internal/services/mssql/helper/sql_retention_policies.go Line 24 in fb309bb
But happy to change the names here if that makes more sense? |
||||||||||||||||||||||||||||
* `week_of_year` - (Optional) The week of year to take the yearly backup. Value has to be between `1` and `52`. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
## Attributes Reference | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
The following attributes are exported: | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
* `id` - The Azure SQL Managed Database ID. | ||||||||||||||||||||||||||||
|
@@ -73,6 +86,7 @@ The `timeouts` block allows you to specify [timeouts](https://www.terraform.io/l | |||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
* `read` - (Defaults to 5 minutes) Used when retrieving the Mssql Managed Database. | ||||||||||||||||||||||||||||
* `create` - (Defaults to 30 minutes) Used when creating the Mssql Managed Database. | ||||||||||||||||||||||||||||
* `update` - (Defaults to 30 minutes) Used when updating the Mssql Managed Database. | ||||||||||||||||||||||||||||
* `delete` - (Defaults to 30 minutes) Used when deleting the Mssql Managed Database. | ||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||
## Import | ||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.