volume
volume create
Create a disk, and optionally mount it.
writes--dry-run
Creates a disk and, when an application and a path are given, mounts it in the same call.
The size is fixed at creation. There is no resize, so the way to a larger disk is a new one and a copy.
Usage
outplane volume create <NAME> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
NAME | string | Letters, numbers, hyphens and underscores. Required. Must match ^[a-zA-Z0-9][a-zA-Z0-9\-_]*$. |
Flags
| Flag | Type | Description |
|---|---|---|
--size | int | Gigabytes, 10 to 50. Required. |
--app | string | Application to mount it on. Needs --mount. |
--mount | string | Path inside the container, such as /data. |
The global flags apply as well.
Output
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
sizeGb | int | 10 to 50, and fixed once created. |
status | string | One of attached, detached. |
app | string | null | The application it is mounted on. |
appId | string | null | |
mountPath | string | null | Where it appears inside the container. |
accessMode | string | Always ReadWriteOnce: one instance mounts it at a time. |
createdAt | string | null | RFC 3339, UTC. |
changed | bool | False for a dry run. |
Examples
A disk to attach later
outplane volume create data --size 10Create and mount in one step
outplane volume create data --size 20 --app checkout --mount /var/lib/dataCheck the request without provisioning a disk
outplane volume create data --size 10 --dry-run --json{
"changed": false,
"name": "data",
"sizeGb": 10
}What to Know
- Creating and attaching are one request and two steps on the server: the disk is created first and then mounted. If the mount fails the disk exists and is detached, so attach it rather than running this again, which would make a second disk.
- --app and --mount go together. One without the other is refused rather than half-applied.
- The size cannot be changed afterwards. There is no resize.
- A mount reaches the running application at its next deployment.
- Team storage is a plan limit, so a large enough disk 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. |
5 | not_found | The named resource does not exist, or is not visible to this credential. |
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 volume.name_required, volume.name_invalid, volume.size_invalid, volume.mount_invalid, volume.attach_incomplete, usage.bad_size, quota.limit_reached, app.not_found. Branch on that, or on the exit status. The message is prose and changes.