planetscalepostgresbackup_policies (Data Source)
June 2, 2026 ยท View on GitHub
PostgresBackupPolicies DataSource
Example Usage
data "planetscale_postgres_backup_policies" "my_postgresbackuppolicies" {
database = "...my_database..."
organization = "...my_organization..."
}
Schema
Required
database(String) Database name slug fromlist_databases. Example:app-db.organization(String) Organization name slug fromlist_organizations. Example:acme.
Read-Only
data(Attributes List) (see below for nested schema)
Nested Schema for data
Read-Only:
display_name(String) The display name of the backup policyfrequency_unit(String) The unit for the frequency of the backup policyfrequency_value(Number) A number value for the frequency of the backup policyid(String) The ID of the backup policyname(String) The name of the backup policyretention_unit(String) The unit for the retention period of the backup policyretention_value(Number) A number value for the retention period of the backup policyschedule_day(Number) Day of the week that the backup is scheduled. 0 is Sunday, 6 is Saturdayschedule_time(String) The time of day that the backup is scheduled, in HH:MM formatschedule_week(Number) Week of the month that the backup is scheduled. 0 is the first week, 3 is the fourth weektarget(String) Whether the policy is for production or development branches