Divergences from Terraform
Where Turf does not do what Terraform does. Tell the user when one matters to their configuration. Each other reference marks its own with Differs from Terraform:; this file indexes them.
Refused constructs
Section titled “Refused constructs”The engine refuses these at plan rather than plan without them, so a run never looks complete while ignoring part of the configuration. The plan names one construct at a time: fix it and plan again to find the next. Never strip a construct out to get past a refusal without the user’s say-so — it may be guarding something.
| Construct | Remedy |
|---|---|
check blocks |
An after_create/after_update turf action that verifies the same thing, or a policy check on the plan. |
precondition / postcondition on an ephemeral resource; a precondition on an output |
The same condition on the resource or data source the value comes from (those are honoured); variable validation {} for inputs; a turf action that verifies after the change; a policy check on the plan. |
Provisioners (also in removed blocks) and connection blocks |
A provider action bound to the event (action_trigger, e.g. the local provider’s local_command), or a turf action. |
enabled on module calls, resources, data sources or ephemeral resources |
count = var.enabled ? 1 : 0. |
| Provider blocks in child modules (a legacy module shape) | The module declares configuration_aliases; the root declares the provider blocks and passes them in the call’s providers = { … }. For a registry module that declares its own, pick a version without, or vendor it under the configuration directory and change it — with the user’s say-so. |
Provider for_each, and instance keys on a provider reference |
One aliased provider block per instance. |
count/for_each on an ephemeral resource |
One ephemeral resource per instance. |
The cloud block |
A backend "remote" for state storage and locking, with the workspace’s execution mode local. |
Test files (*.tftest.hcl) in the configuration directory |
Keep them out of the directory Turf plans; run them with tofu test. |
A count whose only unknown is an impure function (timestamp(), uuid()) |
A known value, such as a variable. |
Not available
Section titled “Not available”- No
-target/-exclude. Every plan is the whole configuration. To leave something broken out of a run, the configuration has to stop declaring it — ask before editing it that way. - No retry. Each change and each action gets one try; a failure settles, and
upagain plans over what was left. - No imperative reads. There is no tool that reads one data source or refreshes one resource: declare a
datablock and plan, orrefreshthe whole workspace. - No interactive prompts at plan. Variable values come from
openand from each plan command (var,var_file);initalone asks the user for a value a module source needs. - No
-var/-var-fileinterleaving. Within one call,varalways wins overvar_file; a plan command’s values win overopen’s, name by name.
Behaviour that differs
Section titled “Behaviour that differs”- Plans are projections of the directory plus its overlays. A
*.turf.hcloverlay — or one passed in memory asoverlays— is part of every plan; tofu and terraform ignore it. (skill_authoring → references/actions.md) openkeeps variable values for the workspace. tofu takes-varon every command; hereopen’svar/var_fileserve every later tool on the workspace, as an exportedTF_VAR_serves a shell, while a plan command’s own hold for that convergence’s rounds alone. Nothing is written down.- A validation decidable only at apply fails after the round applied: the round is recorded as applied, and the convergence ends
failed. A rule that reads a deferred value is decided in the round that converges. (skill_authoring → references/variables.md) - A forced replace can split across rounds. A
replaceorreplace_triggered_byreplace of an object whose provider is configured from something this round applies, where the provider cannot plan with the unknowns, deletes the old object now and creates the new one next round. A replace the provider requires, and a taint, are never split. (skill_authoring → references/lifecycle.md) - A failed
before_creategate on a create-before-destroy replace leaves the old object current, with nothing deposed; Terraform deposes first and leaves nothing current. (references/error-handling.md) - Deposed and tainted objects are not refreshed before the plan replaces or destroys them.
- Data-source reads are committed with an apply. A read lands in state when its round applies — a round that failed partway included — never at a plan that was declined, cancelled or stale. A
destroywithrefreshre-reads only the data sources it evaluates; withrefresh: falseit uses the committed reads. (skill_authoring → references/data-sources.md) - Provider plugins start afresh every round, so a round sees what the previous one applied.
- An import whose
id,tokey orfor_eachis unknown defers its resource to a later round instead of failing. (references/imports.md) listis refused when the backend body readsterraform.workspace. (references/workspaces.md)path.cwdis the configuration directory, as tofu gives it when run inside that directory, as hosted runners run it — not a launch directory, which an MCP client does not have. tofu’s documentation callspath.cwdunstable from one machine to another and recommendspath.moduleandpath.root. A module that resolves a relative input againstpath.cwd(terraform-aws-modules/lambda’ssource_path, say) resolves it against the configuration directory, so give such paths relative to it. (references/credentials.md)TF_DATA_DIRis this server’s setting alone. It applies toinit’s own install; the engine installs under a data directory of its own, one per workspace (turf-engine --data-dir, default its per-user cache), which no plan request names and which never lies in the configuration — a read-only configuration needs nothing set on the engine. tofu accepts any data directory;initrefuses the configuration directory itself and one whosemodulesholds the configuration (an install replaces what it finds there), and a second configuration on a data directory another already uses — as an absoluteTF_DATA_DIRmakes every one — since each would rewrite the other’s module manifest; make it relative to give each configuration its own.path.moduleof a module the engine installed is absolute, as under an absoluteTF_DATA_DIR. (references/credentials.md)
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