Skip to main content

dtcloud_volume_snapshots (Data Source)

Lists the snapshots taken of one volume.

Read-only on purpose: snapshots are managed by dtcloud_snapshot, and creating one here would put two resources in charge of the same object. What this is for is seeing what a destroy would take with it, since deleting a volume deletes its snapshots too.

Example Usage​

data "dtcloud_volume_snapshots" "of_data_volume" {
volume_id = dtcloud_volume.data.id
}

Schema​

Required​

  • volume_id (String) ID of the volume whose snapshots to list.

Read-Only​

  • id (String) The ID of this resource.
  • snapshots (List of Object) Snapshots of the volume, newest first — the API sorts by creation date descending. (see below for nested schema)

Nested Schema for snapshots​

Read-Only:

  • created_on (String)
  • description (String)
  • id (String)
  • name (String)
  • size (Number)
  • status (String)
  • storage_policy (String)

Behaviour worth knowing​

  • Newest first, as the API sorts them by creation date.
  • A volume with no snapshots returns an empty list; a volume that does not exist is an error.