Skip to main content

dtcloud_vm_history_entry (Data Source)

Reads one virtual machine history entry in full.

The list endpoint leaves out status; this is the only way to get it. It is a separate data source rather than the list reading every entry in full, which would cost one call per entry.

Example Usage​

# The most recent entry from dtcloud_vm_history, read in full to get its status.
data "dtcloud_vm_history_entry" "latest" {
vm_id = dtcloud_vm.web.id
history_id = data.dtcloud_vm_history.web.entries[0].id
}

output "latest_status" {
value = data.dtcloud_vm_history_entry.latest.status
}

Schema​

Required​

  • history_id (String) ID of the entry, from dtcloud_vm_history.
  • vm_id (String) ID of the virtual machine.

Read-Only​

  • activity (String) What was done.
  • date_and_time (String) When it happened.
  • id (String) The ID of this resource.
  • initiator (String) Who or what did it.
  • status (String) Outcome of the action. Reported only by this endpoint, not by the list.

Behaviour worth knowing​

warning

The same warning as dtcloud_vm_history applies: this is an event log, and its content moves. Keep it out of resource arguments.