Terrapod is a free, open-source platform replacement for Terraform Enterprise. This patch fixes a state-serial bug that could lose track of infrastructure after a state rollback or a manual state upload.
Bug Fixes
- A rolled-back or manually uploaded state now carries its own serial (#1702). Rolling back a state version, or uploading state by hand, stored the file under a new serial without changing the
serialrecorded inside it. The engine computes its next serial from the file, so a later apply could compute a serial that already existed. Its state upload was then refused with409after the apply had already changed infrastructure, the workspace was flagged diverged, and every following run did the same. The serial inside the stored file now matches its version, and every other byte of the state is left exactly as the engine wrote it.
Upgrade notes
- A workspace already affected recovers with one rollback. On this release, roll back to the workspace's current state version: the copy has the same content with matching serials, and no resources change. Then run a plan and reconcile what the refused applies did. See State Diverged in the runbook.
- No migrations, configuration changes or API changes.
This fix is also in v1.7.1. The 1.6 line otherwise takes security fixes only; this one is included because it can cause state loss.
Status
Stable — a patch for the 1.6 line.
Full Changelog: v1.6.4...v1.6.5