Skip to content

volume

The volume configuration type allows creating, registering, and updating volumes.

Configuration files must have a name ending with .dstack.yml (e.g., .dstack.yml or vol.dstack.yml are both acceptable) and can be located in the project's root directory or any nested folder. Any configuration can be applied via dstack apply.

Examples

Creating a new volume

type: volume
name: my-aws-volume
backend: aws
region: eu-central-1
size: 100GB

Registering an existing volume

type: volume
name: my-external-volume
backend: aws
region: eu-central-1
volume_id: vol1235

Root reference

name - (Optional) The volume name.

backend - The volume backend.

region - The volume region.

size - (Optional) The volume size. Must be specified when creating new volumes.

volume_id - (Optional) The volume ID. Must be specified when registering external volumes.