Resource
dcloud_volume
A block storage volume. Attach it with dcloud_volume_attachment.
Example Usage
resource "dcloud_volume" "data" {
name = "data"
size_gib = 50
}Schema
Required
name(String) A display name. Up to 64 characters. Changing it replaces the resource.size_gib(Number) Size in GiB; a restore needs at least the snapshot’s size. From 10 to 10000. Changing it replaces the resource.
Optional
availability_zone_id(String) The zone it lives in; it attaches only to instances there. Default de1a. Must match^[a-z]+[0-9]+[a-z]$. Changing it replaces the resource.encrypted(Boolean) Encrypt the volume at rest with a key of its own, held in KMS (default true); a restore follows the snapshot instead. Defaulttrue. Changing it replaces the resource.kms_key_id(String) One of your KMS keys to wrap the volume key (needs kms:Encrypt on it); omitted: the platform key. Not with snapshotId. A UUID. Changing it replaces the resource.project(String) The project (its slug) the resource lives in. At create: this, else the provider'sproject, else Default. Changing it moves the resource and its parts; it is never replaced.region_id(String) The region to create it in, e.g. de1 Defaults to the provider'sregion. Changing it replaces the resource.snapshot_id(String) Restore this volume snapshot onto the new volume (same zone, at least its size). Must match^snap-[0-9a-f]{6,32}$. Changing it replaces the resource.tags(Map of String) Tags, key → value. Once set here, only these keys are managed; tags Deutsche Cloud adds itself are left alone.
Read-Only
id(String) The resource's id.state(String)creating,available,in-use,deletingorerror.
Import
Import is supported using the following syntax:
The terraform import command can be used, for example:
terraform import dcloud_volume.data <volume-id>Generated from the provider's schema.
Related