planetscalevitessbackup_policy (Resource)

June 2, 2026 ยท View on GitHub

VitessBackupPolicy Resource

Schema

Required

  • database (String) Database name slug from list_databases. Example: app-db.
  • organization (String) Organization name slug from list_organizations. Example: acme.

Optional

  • frequency_unit (String) The unit for the frequency of the backup policy. must be one of ["hour", "day", "week", "month"]
  • frequency_value (Number) A number value for the frequency of the backup policy
  • name (String) The name of the backup policy
  • retention_unit (String) The unit for the retention period of the backup policy. must be one of ["hour", "day", "week", "month", "year"]
  • retention_value (Number) A number value for the retention period of the backup policy
  • schedule_day (Number) Day of the week that the backup is scheduled. 0 is Sunday, 6 is Saturday
  • schedule_time (String) The time of day that the backup is scheduled, in HH:MM format
  • schedule_week (Number) Week of the month that the backup is scheduled. 0 is the first week, 3 is the fourth week
  • target (String) Whether the policy is for production or development branches. must be one of ["production", "development"]

Read-Only

  • display_name (String) The display name of the backup policy
  • id (String) The ID of the backup policy

Import

Import is supported using the following syntax:

In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:

import {
  to = planetscale_vitess_backup_policy.my_planetscale_vitess_backup_policy
  id = jsonencode({
    database     = "..."
    id           = "..."
    organization = "..."
  })
}

The terraform import command can be used, for example:

terraform import planetscale_vitess_backup_policy.my_planetscale_vitess_backup_policy '{"database": "...", "id": "...", "organization": "..."}'