PlanetScale
PlanetScale is a serverless MySQL and PostgreSQL database platform built on Vitess.Resources
Database
Create, manage and delete PlanetScale databases.Props
The organization name where the database will be created
The name of the database
The database cluster size (e.g., PS_10, PS_20, PS_40, PS_80, PS_160, PS_320, PS_400)
The engine kind for the database
The region where the database will be created
The number of replicas for the database. 0 for non-HA, 2+ for HA
Whether to adopt the database if it already exists in PlanetScale
Whether to delete the database when the resource is destroyed. When false, the database will only be removed from the state but not deleted via API.
Whether or not deploy requests must be approved by a database administrator other than the request creator
Whether or not to limit branch creation to the same region as the one selected during database creation
Whether or not full queries should be collected from the database
Whether or not the web console can be used on the production branch of the database
The default branch of the database
Whether or not to copy migration data to new branches and in deploy requests (MySQL only)
A migration framework to use on the database (MySQL only)
Name of table to use as migration table for the database (MySQL only)
Whether or not data branching is allowed on the database (MySQL only)
Whether or not foreign key constraints are allowed on the database (MySQL only)
The PostgreSQL major version to use for the database (PostgreSQL only)
The CPU architecture for the database (PostgreSQL only)
Returns
The unique identifier of the database
The name of the database
The current state of the database
The default branch name
The plan type
Time at which the database was created
Time at which the database was last updated
HTML URL to access the database
The organization of the database
Branch
Create or manage a PlanetScale database branch.Props
The database name or Database object
The organization name. Automatically inferred from the database if the database is provided as an object.
The name of the branch
Whether or not the branch should be set to a production branch or not
The parent branch name or Branch object
Whether to adopt an existing branch if it exists. If false and the branch exists, an error will be thrown. If true and the branch exists, it will be updated with the provided properties.
Whether to delete the branch when the resource is destroyed. When false, the branch will only be removed from the state but not deleted via API.
If provided, restores the backup’s schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access.
If provided, restores the last successful backup’s schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access, in addition to Data Branching being enabled for the branch.
The database cluster size is required if a backup_id is provided. If the branch is not a production branch, the cluster size MUST be “PS_DEV”.
Enable or disable safe migrations on this branch
Returns
The name of the branch
The name of the parent branch
Time at which the branch was created
Time at which the branch was last updated
HTML URL to access the branch