OXYGENHUB

Terraform state: list, download and restore kept versions issue #255 closed: completed andymccall opened this · 0 comments

andymccall

Asked by Andy (2026-10-18). The hub keeps the last 20 versions of each state (terraform_state_versions, issue #252), but nothing shows or uses them.

  • The state's page (Artifacts › Terraform state, issue #254) lists each state's versions: serial, who wrote it, when, size; the current one marked.
  • Download any version (people with write access: a state holds secrets).
  • Restore a version: written as a new version whose serial is above the current one (lineage kept), so OpenTofu and Terraform accept it and nothing is lost. Going forward again is restoring a newer one: every version stays in the list.
  • Restoring is refused while the state is locked, needs the maintain role, asks for confirmation, and is audited and logged like a write.
  • API: GET …/terraform/state/NAME/versions, GET …/versions/ID, POST …/versions/ID/restore.
  • A restore through a version never deletes the versions after it; only the 20-version window drops the oldest.

andymccall set labels feature ·

closed by change 67523e06ed86 ·