Skip to content

volume

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

Configuration files must be inside the project repo, and their names must end with .dstack.yml (e.g. .dstack.yml or fleet.dstack.yml are both acceptable). Any configuration can be run via dstack apply.

Examples

Creating a new volume

type: volume
# The name of the volume
name: my-new-volume

# Volumes are bound to a specific backend and region
backend: aws
region: eu-central-1

# The size of the volume
size: 100GB

Registering an existing volume

type: volume
# The name of the volume
name: my-existing-volume

# Volumes are bound to a specific backend and region
backend: aws
region: eu-central-1

# The ID of the volume in AWS
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.