Skip to content

Journey: A product that installs itself

Make your product an autonomous infrastructure layer. A product that needs cloud infrastructure ships a forty-page deployment guide and sends a solutions engineer. Embed Turf instead: the product ships its reference architecture as an ordinary Terraform configuration plus one file of its own steps, and the customer’s agent — or the product’s own — installs it in the customer’s account, on plan. Autonomous, and governed: the plan is the install’s contract, and the steps the author wrote in stop the apply even when it runs unattended.

Example: use-cases/products/data-lake-installer in turf-examples — a small data lake on AWS. Plan-only, with no credentials: nothing in this journey is applied, and no AWS account is needed. Load skill_deployment. One beat at a time; end each on a cue.


Beat 1 — The installer is a configuration (start here, tool-free)

Section titled “Beat 1 — The installer is a configuration (start here, tool-free)”

Say the problem in a sentence (the guide and the engineer), then the shape of the answer: lake.tf is the reference architecture — a VPC and two subnets for the compute that will query the lake, a raw and a curated bucket with public access blocked, a Glue catalog database, an Athena workgroup, the role they assume. Ordinary Terraform, resources rather than a registry module so that a step can be invoked before anything exists (beat 4). providers.tf is what makes it plan-only:

provider "aws" {
region = var.region
access_key = var.plan_only ? "mock_access_key" : null
secret_key = var.plan_only ? "mock_secret_key" : null
skip_credentials_validation = var.plan_only # no STS call
skip_requesting_account_id = var.plan_only # no account lookup
skip_metadata_api_check = var.plan_only # no IMDS probe
skip_region_validation = var.plan_only
}

and installer.turf.hcl is the product’s own steps — three Turf actions:

action "turf_action" "verify_private" { … } # after each bucket: public access block holds, else taint
action "turf_action" "welcome" { … } # after the workgroup: tell the customer; a failed notice only warns
action "turf_action" "consent" { … } # before the catalog is destroyed: ask the customer; in a destroy a "no" only warns

Your cue — “what does the customer have to provide?”


  • init({ path: "<examples>/use-cases/products/data-lake-installer", config_alias: "lake" }).

Read variables[] to the user: the entries with no default — product_name, tenant, region — are the install questionnaire, exactly what the customer supplies; everything else (plan_only, vpc_cidr) has the product’s default. init also installed the aws provider and reported its version, package directory and hashes. The configuration is the source of truth; the customer supplies only what it deliberately leaves out.

Ask the user for the three values (or offer lakehouse / acme / us-east-1).

Your cue — “plan it.”


  • open({ config_alias: "lake", workspace_alias: "lake" }).
  • up({ workspace_alias: "lake", var: { product_name, tenant, region } }), then plan({ workspace_alias: "lake", refresh: false }).

Present the plan: 11 to add — the VPC and two subnets, two buckets, two public access blocks, the catalog, the workgroup, the role and its policy — and zero API calls: the provider was configured with the skip flags, and the IAM policy documents (the plan’s read) are computed locally. This is what the customer reads before anything exists in their account.

Then plan.invocations: verify_private on each bucket (after_create, taint), welcome on the workgroup (after_create, continue). (consent is bound to before_destroy, so a create plan does not list it.) Make the point: an installer approves each round itself — plan, then apply with the digest, round after round, the low-risk rule met by construction — which is how a product installs itself; and these steps still stop it, because they are the author’s, not the approver’s. Governed autonomy, not unattended by design.

We do not apply (mock keys). Not calling apply is declining.

Your cue — “can I see one of those steps run?”


Triggered by: the user wanting a turf action live.

consent is declared, so it can be put to the customer on demand:

  • invoke({ workspace_alias: "lake", action_addr: "action.turf_action.consent" }) — a plan with one invocation and no resource changes; approve; apply → awaiting_actions.
  • Ask the user, as the customer: may the <product> data catalog for tenant <tenant> be removed, understanding the lake’s tables become unqueryable? Quote them. Answer — a “no” is succeeded: false with their reason. converged (or failed, carrying it).

Your cue — “and after the install?”


Three sentences, no tools: drift — a bucket policy changed by hand shows up as drift on the next refresh, and up plans the correction; upgrade — the product ships a new module version and the diff is a plan to read; retirement — destroy is the graph in reverse, and consent puts the question to the customer before the catalog goes — on the record, though in a destroy a “no” only warns, so the customer’s approval of the plan is the guard. With the customer’s credentials and plan_only = false, the same plan applies.

Close: cancel the paused convergence, close({ workspace_alias: "lake" }). Point to the guardrails journey for scanning and pinning what an installer ships.

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