sylve_vm_snapshot (Resource)

A point-in-time ZFS snapshot of a sylve_vm’s root dataset(s). Crash-consistent and can be taken whether the VM is running or stopped – no shutoff requirement, unlike sylve_vm_storage. See sylve_vm_snapshot_rollback to actually restore one. There is no rename endpoint, so name/description are immutable; changing either recreates the snapshot (i.e. deletes the old one and takes a fresh one – it does NOT edit history in place).

Example Usage

# Crash-consistent regardless of whether the VM is running or stopped.
# name/description are immutable -- there's no rename endpoint, so
# changing either recreates the snapshot (deletes the old one, takes a
# fresh one) rather than editing history in place.
resource "sylve_vm_snapshot" "before_upgrade" {
  rid         = sylve_vm.example.rid
  name        = "before-upgrade"
  description = "before applying package upgrades"
}

Schema

Required

  • name (String) Snapshot name. Immutable (no rename endpoint).
  • rid (Number) RID of the sylve_vm to snapshot. Immutable.

Optional

  • description (String) Free-text description. Immutable, same reason as name.

Read-Only

  • id (String) Terraform resource identity – the snapshot’s own numeric ID.
  • root_datasets (List of String) ZFS dataset(s) this snapshot covers.
  • snapshot_name (String) Sylve’s own internal ZFS snapshot name (distinct from the display name above).

Not published on the Terraform Registry yet -- see the repo's README for local dev_overrides usage in the meantime.

This site uses Just the Docs, a documentation theme for Jekyll.