arvancloud_iaas_snapshots (Data Source)
Lists IaaS snapshots, optionally filtered by region or availability zone.
Example Usage
# List all snapshots across all regions
data "arvancloud_iaas_snapshots" "all" {}
# List snapshots filtered by region
data "arvancloud_iaas_snapshots" "by_region" {
region = "ir-central1"
}
# List snapshots filtered by availability zone
data "arvancloud_iaas_snapshots" "by_az" {
availability_zone = "ir-central1-a"
}
output "all_snapshot_ids" {
value = [for s in data.arvancloud_iaas_snapshots.all.snapshots : s.id]
}
output "central_snapshots" {
value = data.arvancloud_iaas_snapshots.by_region.snapshots
}
Schema
Optional
availability_zone(String) Filter snapshots by availability zone code name (e.g.ir-central1-a). Cannot be combined withregion.region(String) Filter snapshots by region code name (e.g.ir-central1). Cannot be combined withavailability_zone.
Read-Only
id(String) Unique identifier for this data source.snapshots(Attributes List) List of snapshots matching the specified filters. (see below for nested schema)
Nested Schema for snapshots
Read-Only:
availability_zone(String) Availability zone where the snapshot is stored (e.g.ir-central1-a).created_at(String) Timestamp when the snapshot was created.description(String) Description of the snapshot.id(String) Unique identifier of the snapshot.image_id(String) ID of the image associated with the snapshot.name(String) Name of the snapshot.real_size(Number) Actual disk usage of the snapshot in bytes.real_size_avail(Boolean) Whether the real size information is available.region(String) Region where the snapshot is stored (e.g.ir-central1).reverted_on(String) Timestamp when the snapshot was last reverted, if applicable.server_id(String) ID of the source server.server_name(String) Name of the source server.size(Number) Size of the snapshot in GiB.status(String) Current status of the snapshot.type(String) Type of snapshot (e.g.server,volume).volume_id(String) ID of the source volume.volume_name(String) Name of the source volume.