dtcloud_snapshots (Data Source)
Lists every snapshot visible to the caller.
Not a duplicate of dtcloud_volume_snapshots, which reads a different endpoint scoped to one volume
and sorted newest first. This one covers every snapshot, in the platform's own order.
Example Usage
data "dtcloud_snapshots" "ready" {
status = "available"
}
data "dtcloud_snapshots" "of_data_volume" {
volume_id = dtcloud_volume.data.id
}
Schema
Optional
name(String) Only return snapshots with this exact name. Applied by the provider.status(String) Only return snapshots in this status, e.g.available. Applied by the provider.volume_id(String) Only return snapshots of this volume. Applied by the provider.
Read-Only
id(String) The ID of this resource.snapshots(List of Object) The snapshots that matched, in the order the platform returned them. (see below for nested schema)
Nested Schema for snapshots
Read-Only:
created_at(String)description(String)id(String)name(String)size(Number)status(String)storage_policy(String)updated_at(String)volume_id(String)volume_type_id(String)
Behaviour worth knowing
- The filters are applied by the provider, since the list endpoint takes none, and they combine.
volume_idandnamematch exactly andstatusignores case. A filter that matches nothing returns an empty list. storage_policyis resolved once per run fromvolume_type_id, and is empty if that lookup fails.- There is no
progressorproject_idhere. The list endpoint does not report them; read one snapshot withdtcloud_snapshotwhen you need either.