Skip to content

Feature matrix: Hybrid execution vs. legacy compatibility

Both execution modes share the same Python authoring API (nf.core), typed provider bindings, offline pytest synthesis tests, and nf lint policy checks. They differ in which engine plans, applies, and owns state.

Capability Hybrid execution (default) Legacy compatibility (nf synth)
Execution engine nf invokes provider binaries directly over tfplugin5/tfplugin6 gRPC External Terraform or OpenTofu binary runs against .nf.out/
External CLI required None terraform or tofu binary on execution host
pyproject.toml key [tool.nf].apps (alias: hybrid_apps) [tool.nf].terraform_apps (alias: legacy_apps)
Plan artifact Immutable whole-app JSON plan with SHA-256 digest, state serial/lineage, provider fingerprints, and input digests External Terraform/OpenTofu plan file per stack
State backends Local, S3, GCS, Azure, Consul, PostgreSQL (document or row-level graph state), HCP Terraform Whatever the external CLI supports in synthesized backend blocks
Concurrent applies on one app Supported via PostgreSQL graph state (--concurrent-applies with baseline) One writer lock per state
Failure recovery CHECKPOINT (default), ROLLBACK (deletes newly created resources), or NONE External CLI leaves partial changes in state
Retained teardown LifecycleRules(retain="why") keeps objects managed & checked through nf destroy; Teardown[T] inputs verified External CLI prevent_destroy fails destroy; removed stops managing
Checks & finalizers @app.check (prerequisites, plan, apply, finalize with nf state verify), @runtime_check, @retained_check External CLI check / precondition / postcondition blocks
Deferred provider configuration Converges prerequisites + dependent providers in one apply (multi-round) External CLI support only
Runtime Python execution @hybrid_runtime functions run with resolved values during apply Static Python at synth time + Fn.* Terraform functions
Existing object adoption First-class import plan action (import_from, adopt=True, --adopt-from manifest) External CLI import blocks / commands
Terraform provisioner, connection, create_before_destroy Explicitly rejected (fail closed) Emitted for Terraform/OpenTofu to handle
Interactive TUI & SDK Full support (nf tui, nf follow, nf.sdk.Project) Stack browsing and passthrough via nf tui / nf.sdk