Skip to main content

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_id and name match exactly and status ignores case. A filter that matches nothing returns an empty list.
  • storage_policy is resolved once per run from volume_type_id, and is empty if that lookup fails.
  • There is no progress or project_id here. The list endpoint does not report them; read one snapshot with dtcloud_snapshot when you need either.