Skip to content

Volume

A Volume represents a block storage device that can be attached to a Vm. On AWS this is an EBS volume, on GCP a Persistent Disk. Hetzner and DigitalOcean provide block storage with their cloud server offerings (volume API available on Hetzner, not on DO).

Property Type Required Description
name string yes Unique resource name
id string no Explicit ID (auto-generated UUID if omitted)
provider string no Provider label for multi-provider configs
tags Record<string, string> no Arbitrary key-value metadata
size number yes Volume size in GB
vm Vm | string no VM to attach the volume to
import { Vpc, Vm, Volume } from '@kykucloud/types'
const myVpc = new Vpc({ name: 'my-vpc', cidr: '10.0.0.0/16', region: 'eu-central' })
const server = new Vm({
name: 'db-server',
instanceType: 'large',
image: 'ubuntu-24.04',
network: myVpc,
})
const dataVolume = new Volume({
name: 'data-volume',
size: 500,
vm: server,
})
Provider Supported Backend
AWS EBS (Elastic Block Store)
GCP Persistent Disk
Hetzner Volume
DigitalOcean Not available
  • AWS EBS volumes are AZ-specific. If vm is specified, the volume is created in the same AZ as the VM. Types include gp3 (general purpose), io2 (provisioned IOPS), and st1 (throughput optimized). Default type is gp3.
  • GCP Persistent Disks support both standard and SSD types. Disks are zonal resources. Snapshots are managed separately.
  • Hetzner Volumes are created in the same location as the attached server. Minimum size is 10 GB.
  • Volume attachment is handled automatically when vm is specified. Without vm, the volume is created unattached.
  • Immutable: Volume size can be increased but not decreased on most providers. AZ/zone cannot be changed.