Terraform · Arazzo Workflow
Terraform Push a New State Version Under Lock
Version 1.0.0
Lock a workspace, read its current state serial, upload a new state version, and unlock.
View Spec
View on GitHub
Infrastructure As CodeCloud InfrastructureDevOpsOpen SourceHashiCorpArazzoWorkflows
Provider
Workflows
migrate-state-version
Safely upload a new Terraform state version to a locked workspace.
Locks the workspace, inspects the current state serial, pushes a new base64-encoded state version with its MD5 checksum, confirms the upload, and releases the lock.
1
lockWorkspace
LockWorkspace
Lock the workspace before touching state. HCP Terraform rejects state uploads to an unlocked workspace, and the lock prevents a concurrent run from racing the migration.
2
listStateVersions
ListStateVersions
List the workspace's existing state versions, newest first, to learn the current serial so the replacement serial can be checked against it.
3
readCurrentState
GetStateVersion
Read the current state version for its hosted download URL, giving the caller a retrievable backup of the state about to be superseded.
4
pushStateVersion
CreateStateVersion
Upload the new state version to the locked workspace, supplying the serial, the MD5 checksum, and the base64-encoded state payload.
5
verifyStateVersion
GetStateVersion
Read the newly created state version back to confirm it was accepted and recorded with the expected serial before releasing the lock.
6
unlockWorkspace
UnlockWorkspace
Release the workspace lock now that the new state version is confirmed, so runs can resume against the migrated state.