okustera_storage_volume (Resource)
The okustera_storage_volume resource allocates persistent, fault-tolerant NVMe and standard block storage volumes in Okustera. Volumes can be attached to compute instances or formatted as raw/ext4 block devices.
Example Usage
100 GB Data Volume
resource "okustera_storage_volume" "db_data" {
name = "db-data-volume"
size_gb = 100
description = "Persistent database storage for PostgreSQL"
volume_type = "nvme-standard"
}
Schema
Required
name(String) Name of the block volume.size_gb(Number) Storage capacity in Gigabytes (1-10000).
Optional
description(String) Volume description.volume_type(String) Storage performance tier (e.g.nvme-standard,ssd-fast).image_id(String) Optional OS image ID to clone from.snapshot_id(String) Optional snapshot ID to restore from.
Read-Only Attributes
id(String) Volume UUID.status(String) Volume status (e.g.available,in-use).bootable(Boolean) Whether the volume contains a bootable image.created_at(String) Creation timestamp.
Import
Existing volumes can be imported using their UUID:
terraform import okustera_storage_volume.db_data <volume_uuid>