volume
volume detach
Unmount a disk, keeping it and its contents.
writesrepeatable--dry-run
Unmounts a disk, keeping it and everything on it. The application loses the mount at its next deployment.
This is what has to happen before a disk can be deleted.
Usage
outplane volume detach <VOLUME> [flags]Arguments
| Argument | Type | Description |
|---|---|---|
VOLUME | string | Volume name or id. Required. |
Flags
| Flag | Type | Description |
|---|---|---|
--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
Unmount a disk
outplane volume detach dataSee which application would lose it
outplane volume detach data --dry-run --json{
"app": "checkout",
"changed": false,
"name": "data"
}Detach it and deploy, so the running app loses the mount now
outplane volume detach data --deploy --json --fields app,changedWhat to Know
- Detaching is not deleting. The disk keeps its contents and its cost, and can be mounted again.
- A disk that is not attached reports changed false and exits 0.
- The application loses the mount at its next deployment.
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, usage.missing_argument. Branch on that, or on the exit status. The message is prose and changes.