Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rafftechnologies.com/llms.txt

Use this file to discover all available pages before exploring further.

Updated May 10, 2026 Manages a Raff snapshot — a point-in-time capture of a VM disk or a volume. Once taken, the source binding (resource_type, vm_id, volume_id) is immutable — Terraform owns the snapshot’s lifecycle (rename, delete). Restore is an imperative operation; use raff snapshot restore when you need it.

Example — VM snapshot

resource "raff_snapshot" "pre_upgrade" {
  name          = "web-01-pre-upgrade"
  resource_type = "vm"
  vm_id         = raff_vm.web.id
}

Example — volume snapshot

resource "raff_snapshot" "data_weekly" {
  name          = "data-01-2026-05-10"
  resource_type = "volume"
  volume_id     = raff_volume.data.id
}

Argument reference

Required

ArgumentTypeDescription
namestringSnapshot name. Updates trigger a rename
resource_typestringSource type: vm or volume. ForceNew

Optional (one required, depending on resource_type)

ArgumentTypeDescription
vm_idstring (UUID)Source VM UUID. Required when resource_type = "vm". ForceNew
volume_idintSource volume ID. Required when resource_type = "volume". ForceNew

Attribute reference (computed)

AttributeDescription
idSnapshot ID
sizeSnapshot size (string, e.g. "50 GB")
statusEmpty when saved-but-not-in-use; active when the source is currently reverted to this snapshot (cannot be deleted in this state)
created_atRFC3339 timestamp

Lifecycle

OperationBehavior
terraform apply (create)Captures a new snapshot
Change nameIn-place rename
Change resource_type / vm_id / volume_idReplacement — snapshots are immutable; Terraform destroys and recreates
terraform destroyDeletes the snapshot. Fails if status = "active" — restore the source elsewhere first

Importing existing snapshots

terraform import raff_snapshot.pre_upgrade <snapshot-id>

Permissions

The API key needs snapshot.create, snapshot.manage, and snapshot.delete in the project. The system role Project Admin grants all of these.

Data sources

# Single snapshot by ID
data "raff_snapshot" "pre_upgrade" {
  id = 17
}

# All snapshots in the current project
data "raff_snapshots" "all" {}

raff_backup

Heavier-weight backup with retention.

raff_volume

Block storage volumes.

CLI: raff snapshot

Imperative equivalent.
Last modified on May 11, 2026