arvancloud_iaas_volumes (Data Source)
Lists IaaS block storage volumes, optionally filtered by region or availability zone.
Example Usage
# List all volumes from all availability zones.
data "arvancloud_iaas_volumes" "all" {}
output "all_volumes" {
value = data.arvancloud_iaas_volumes.all.volumes
}
# List volumes in a specific region.
data "arvancloud_iaas_volumes" "ir_central" {
region = "ir-central1"
}
output "ir_central_volumes" {
value = data.arvancloud_iaas_volumes.ir_central.volumes
}
# List volumes in a specific availability zone.
data "arvancloud_iaas_volumes" "az_a" {
availability_zone = "ir-central1-a"
}
output "az_a_volume_names" {
value = [for v in data.arvancloud_iaas_volumes.az_a.volumes : v.name]
}
Schema
Optional
availability_zone(String) Filter volumes by availability zone code name (e.g.ir-central1-a). Cannot be combined withregion.region(String) Filter volumes by region code name (e.g.ir-central1). Cannot be combined withavailability_zone.
Read-Only
id(String) Unique identifier for this data source.volumes(Attributes List) List of volumes matching the specified filters. (see below for nested schema)
Nested Schema for volumes
Read-Only:
availability_zone(String) Availability zone where the volume is stored (e.g.ir-central1-a).bootable(String) Whether the volume is bootable.created_at(String) Timestamp when the volume was created.description(String) Description of the volume.id(String) Unique identifier of the volume.name(String) Name of the volume.region(String) Region where the volume is stored (e.g.ir-central1).server_id(String) ID of the server instance the volume is attached to, if any.server_name(String) Name of the server instance the volume is attached to, if any.size(Number) Size of the volume in GiB.status(String) Current status of the volume (e.g.available,in-use).type(String) Volume type (e.g.ssd).