volume
volume attach
Mount a disk on an application.
writesrepeatable--dry-run
Mounts an existing disk on an application at a path inside the container.
The mount reaches the running application at its next deployment. Moving a disk to a different path on the same application is refused: detach it and attach it again, which makes the owner of the data say so twice.
Usage
outplane volume attach <VOLUME> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
VOLUME | string | Volume name or id. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
--app | string | Application to mount it on. Required. |
--mount | string | Path inside the container. Required. |
--deploy | bool | Deploy afterwards, so the mount reaches the running app. |
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 |
Examples
Mount a disk
outplane volume attach data --app checkout --mount /var/lib/dataCheck the mount without changing anything
outplane volume attach data --app checkout --mount /data --dry-run --json{
"app": "checkout",
"changed": false,
"mountPath": "/data",
"name": "data"
}Attach it and deploy in one step
outplane volume attach data --app checkout --mount /data --deploy --json --fields app,mountPath,changedWhat to Know
- The mount reaches the running application at its next deployment, not immediately. Scaling and pausing are the immediate ones.
- Moving a disk to a different path on the same application is refused. Detach and attach again, which is the platform making the data's owner say so twice.
- A path already used by another disk on the same application is refused.
- The disk and the application have to be in the same team.
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. |
8 | upstream | The Out Plane API returned a server error. |
The code on the error object is one of volume.not_found, volume.attach_incomplete, volume.mount_invalid, app.not_found, usage.missing_argument. Branch on that, or on the exit status. The message is prose and changes.