db
db create
Provision a managed PostgreSQL database.
writes--dry-run
Provisions a managed PostgreSQL instance.
The region is required and permanent, so it is the one thing worth deciding before
running this. The command returns before the instance is ready: poll db get until
it reports active, because connecting sooner fails.
Usage
outplane db create <NAME> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
NAME | string | The database's name. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
--region | string | Where it runs. Required, and permanent. One of aws-us-east-1, aws-us-east-2, aws-us-west-2, aws-eu-central-1, aws-eu-west-2, aws-ap-southeast-1, aws-ap-southeast-2, aws-sa-east-1. |
--version | string | PostgreSQL major version. Defaults to 17. One of 14, 15, 16, 17, 18. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
status | string | Only active accepts connections. provisioning means the provider has not finished. One of provisioning, active, failed, deleting. |
version | string | PostgreSQL major version. |
region | string | Fixed at creation. |
size | string | null | The provider's compute unit, such as 0.25-1. Not a platform instance code. |
createdAt | string | null | RFC 3339, UTC. |
changed | bool |
Examples
A database in Frankfurt
outplane db create orders --region aws-eu-central-1Check the request without provisioning anything
outplane db create orders --region aws-eu-central-1 --dry-run --jsonAn older major version
outplane db create legacy --region aws-eu-central-1 --version 15What to Know
- The command returns before the database is ready. Poll
outplane db get <name>until status is active; connecting sooner fails. - There is no default region, because it cannot be changed afterwards and a wrong one means moving the data by hand.
- How many databases a team may have is a plan limit, so exceeding it is exit 7 rather than a validation error.
Errors
Beyond 0 for success, this command exits with:
| Exit | Kind | Meaning |
|---|---|---|
2 | usage | Invalid arguments, unknown flag, or client-side validation failure. |
3 | auth | Not authenticated, token revoked or expired, or forbidden for this team. |
7 | quota | Plan limit reached or payment required. Not a rate limit; retrying will not help. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of db.name_required, db.name_invalid, db.region_required, db.region_invalid, db.version_invalid, quota.limit_reached. Branch on that, or on the exit status. The message is prose and changes.