Provides an RDS instance backup policy resource and used to configure instance backup policy.

Example Usage

resource "alicloud_db_backup_policy" "default" {
    instance_id = "rm-2eps..."
    backup_period = ["Monday", "Wednesday"]
    backup_time = "02:00Z-03:00Z"
    retention_period = 7
    log_backup = true

Argument Reference

The following arguments are supported:

  • instance_id - (Required) The Id of instance that can run database.
  • backup_period - (Optional) DB Instance backup period. Valid values: [Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday]. Default to ["Tuesday", "Thursday", "Saturday"].
  • backup_time - (Optional) DB instance backup time, in the format of HH:mmZ- HH:mmZ. Time setting interval is one hour. Default to "02:00Z-03:00Z". China time is 8 hours behind it.
  • retention_period - (Optional) Instance backup retention days. Valid values: [7-730]. Default to 7.
  • log_backup - (Optional) Whether to backup instance log. Default to true.
  • log_retention_period - (Optional) Instance log backup retention days. Valid values: [7-730]. Default to 7. It can be larger than 'retention_period'.

Attributes Reference

The following attributes are exported:


RDS backup policy can be imported using the id or instance id, e.g.

$ terraform import alicloud_db_backup_policy.example "rm-12345678"

© 2018 HashiCorpLicensed under the MPL 2.0 License.