Out Plane
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

ArgumentTypeDescription
VOLUMEstringVolume name or id. Required.

Flags

FlagTypeDescription
--appstringApplication to mount it on. Required.
--mountstringPath inside the container. Required.
--deployboolDeploy afterwards, so the mount reaches the running app.

The global flags apply as well.

Output

FieldTypeDescription
idstring
namestring
sizeGbint10 to 50, and fixed once created.
statusstringOne of attached, detached.
appstring | nullThe application it is mounted on.
appIdstring | null
mountPathstring | nullWhere it appears inside the container.
accessModestringAlways ReadWriteOnce: one instance mounts it at a time.
createdAtstring | nullRFC 3339, UTC.
changedbool

Examples

Mount a disk

outplane volume attach data --app checkout --mount /var/lib/data

Check 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,changed

What 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:

ExitKindMeaning
2usageInvalid arguments, unknown flag, or client-side validation failure.
3authNot authenticated, token revoked or expired, or forbidden for this team.
5not_foundThe named resource does not exist, or is not visible to this credential.
8upstreamThe 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.

On this page