Planfiles: plan here, apply there
A planfile is a plan the engine keeps after the convergence that made it has ended, for a later
convergence to apply exactly as it was made. It is how a plan is reviewed and approved in one
place and applied in another — a second server, a second session, a second set of credentials —
the way tofu plan -out and tofu apply <planfile> split a run, except that nothing is written
to disk: the planfile lives in the engine, named by the planned round and the digest of its
document.
Making one
Section titled “Making one”Add plan_only: true to the start verb — up({ plan_only: true }), destroy({ plan_only: true }),
refresh, import and invoke alike — and plan the round as usual:
up({ plan_only: true }) # awaiting_plan, as every start verbplan({ convergence_id: "…" }) # plans the round, then ends: outcome plannedThe round ends planned instead of waiting at its approval point: nothing is approved, nothing
is applied, the workspace is free. The result carries:
planfile.ref— the planfile’s name (the planned round’s id).applyandshowtake it.planfile.digest— the engine’s digest of the plan document,sha256:…of the bytesshow({ planfile })reads withshow_sensitive. It is whatapplynames as the approval, and it equalsplan.digest.planfile.expires_at— when the engine lets it go (the engine’s retention, 24 hours by default).plan— the same summary an approval point hands over (plan.uri, the counts, the invocations), so the plan is reviewed exactly as a waiting one is.
A plan-only convergence is one round: what it defers stays deferred, and the next plan is another
plan_only run. status({}) and open list the planfiles a workspace holds (planfiles[]: ref,
kind, digest, counts, expiry, and whether one is being applied).
Reviewing one
Section titled “Reviewing one”show({ planfile: "<ref>" }) reads the document (redacted; show_sensitive: true for the bytes
the digest hashes). Hand it to your policy tools as you would a waiting plan. The approval rule is
the same: approve yourself only a low-risk plan; consult the user on anything else, and always on a
destroy plan.
Applying one
Section titled “Applying one”apply({ workspace_alias: "…", planfile: "<ref>", plan_digest: "<planfile.digest>" })That call is the approval, of exactly that plan: the digest you name must be the planfile’s,
read from the document you reviewed — any other is refused, and the planfile is left for another
try. It starts a new one-round convergence on the workspace, which must be free (nothing is
superseded for a planfile), and follows it as apply follows an approved round: to
awaiting_actions for turf actions, to applying at the server’s deadline, or to its end.
Never with convergence_id, decline or action_results: a planfile names no convergence and
answers no gate.
The engine holds the convergence to the plan, and ends it stale (rounds[].stale_reason
says which pin failed) when anything moved since the plan was made:
- the configuration — a
.tf,.tfvarsor lock-file edit, a module source that fetches other bytes; - the state — any change recorded on the workspace since: another convergence’s apply, a
taint, a statefile edited outside Turf; - the mode or the workspace name — a destroy planfile applied as an
up, or on another workspace; - the digest — the plan approved is not the plan sealed.
A stale planfile is left where it was: revert what moved and apply again, or plan anew. A planfile that expired, or was already applied (a plan is applied once), fails the call by name: plan again.
converged ends it as any apply does; exhausted says the plan deferred work — the next step is a
new plan (up({ plan_only: true }) again, or up without it to run the rounds here).
Two servers, two credentials
Section titled “Two servers, two credentials”The planfile is what lets a server that can plan but not apply hand its work to one that can
apply but not plan: the first ends every convergence planned and reports planfile.ref and
planfile.digest; a reviewer approves the document; the second opens the same workspace and calls
apply({ planfile, plan_digest }). The engine’s pins make the hand-off safe — what the reviewer
approved is what applies, or nothing does. The planned round’s approved_by on the engine’s record
names the applying server and its client. The apply’s providers get the applying server’s provider
environment, not the planner’s (references/credentials.md).
A server runs at a permission tier (--tier read|plan|apply|full, env TURF_TIER; full is the
default), chosen by whoever launches it: the tools outside the tier are not listed, and the
arguments outside it are refused in words. A credential handed to a server buys that tier’s calls
and no other. The server’s instructions end with a paragraph naming its tier, so you know which
server you are on.
- read —
list,status,show,output,state_list,provider_search,provider_describe, the skills, andinit,open,closeto bind the workspace a read needs. Nothing runs. - plan — the reads, the start verbs,
planandcancel. Every run it starts isplan_onlywhether or not you asked (the result’s note says so):planends itplannedwith a planfile, and there is noapplyhere.cancelstops a convergence at a gate or planning; oneapplyingor atawaiting_actionsis the applier’s to stop, and is refused. - apply — the reads,
applyandcancel:apply({ workspace_alias, planfile, plan_digest })applies a planner’s planfile, andapply({ convergence_id, plan_digest })approves a plan another server left at its approval point. No start verb, noplan, no/upor/destroy. - full — everything, with
taint,untaint,deleteandopen({ force_unlock }), which every other tier refuses.
The handoff between tiers is the planfile: the planner’s planned result names it (planfile.ref,
planfile.digest); the applier opens the workspace and applies it with that digest, as above.
Turf™ is a trademark of Turf LLC. Terraform® is a trademark of HashiCorp. Ansible® is a trademark of Red Hat, LLC, registered in the United States and other countries. Helm®, Kubernetes®, Prometheus® and OpenTelemetry® are registered trademarks, and Jaeger™ is a trademark, of the Linux Foundation. OpenTofu® and Model Context Protocol® are registered trademarks of LF Projects, LLC. All other trademarks are the property of their respective owners. Turf is not affiliated with, endorsed by, or sponsored by HashiCorp, IBM, Red Hat, the Linux Foundation, LF Projects or the OpenTofu project.
© 2026 Turf LLC. Free for individuals, education and small businesses within the Community limits, under the Turf Community Edition License 1.0. Government and larger organizations need a commerciallicense.turf.build · Discord ·GitHub