Skip to content

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.

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.
  • 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 up again plans over what was left.
  • No imperative reads. There is no tool that reads one data source or refreshes one resource: declare a data block and plan, or refresh the whole workspace.
  • No interactive prompts at plan. Variable values come from open and from each plan command (var, var_file); init alone asks the user for a value a module source needs.
  • No -var / -var-file interleaving. Within one call, var always wins over var_file; a plan command’s values win over open’s, name by name.
  • Plans are projections of the directory plus its overlays. A *.turf.hcl overlay — or one passed in memory as overlays — is part of every plan; tofu and terraform ignore it. (skill_authoring → references/actions.md)
  • open keeps variable values for the workspace. tofu takes -var on every command; here open’s var/var_file serve every later tool on the workspace, as an exported TF_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 replace or replace_triggered_by replace 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_create gate 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 destroy with refresh re-reads only the data sources it evaluates; with refresh: false it 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, to key or for_each is unknown defers its resource to a later round instead of failing. (references/imports.md)
  • list is refused when the backend body reads terraform.workspace. (references/workspaces.md)
  • path.cwd is 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 calls path.cwd unstable from one machine to another and recommends path.module and path.root. A module that resolves a relative input against path.cwd (terraform-aws-modules/lambda’s source_path, say) resolves it against the configuration directory, so give such paths relative to it. (references/credentials.md)
  • TF_DATA_DIR is this server’s setting alone. It applies to init’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; init refuses the configuration directory itself and one whose modules holds the configuration (an install replaces what it finds there), and a second configuration on a data directory another already uses — as an absolute TF_DATA_DIR makes every one — since each would rewrite the other’s module manifest; make it relative to give each configuration its own. path.module of a module the engine installed is absolute, as under an absolute TF_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