Skip to content

chant with Terraform, OpenTofu and Pulumi

llms.txt lists every page for an agent

For a team that runs Terraform or OpenTofu roots, or Pulumi programs: keep them as they are, add them to a chant workspace, and run them on choudoufu or plunge when you want ownership markers on the resources.

Works

  • The terraform lexicon reads your .tf roots as they are, lints them, and plans and applies them through terraform, tofu or choudoufu
  • The pulumi lexicon reads a Pulumi program from its stack export and previews, and pulumi up still applies it
  • choudoufu, an OpenTofu fork, and plunge, a Pulumi fork, keep each resource's ownership as a marker on the resource itself

Differs

By forge

  • --generate github writes the pull-request workflow under .github/workflows/, run on pull_request and on push to the target branch.
  • Both jobs use the job's own github.token. On a pull request from a fork that token is read-only, so the plan note and the status are not posted.

First step

For a Pulumi program, install @intentius/chant-lexicon-pulumi instead.

Terminal window
npm install --save-dev @intentius/chant-lexicon-terraform

Terraform getting started

Or hand this step to your coding agentIt stops at a pull request or a report.
Show the whole prompt
Read https://intentius.io/chant/for/terraform-pulumi/.
Add the Terraform or OpenTofu roots in this repository, or its Pulumi program, to a chant workspace.
For Terraform or OpenTofu, follow https://intentius.io/chant/lexicons/terraform/getting-started/. For Pulumi, follow https://intentius.io/chant/lexicons/pulumi/getting-started/.
Run `npx chant build` until it passes, and open a pull request with the config. Do not run `terraform apply`, `tofu apply` or `pulumi up`.
Never deploy to a real cloud account or shared environment (with `chant run`, `chant components` or a platform's own CLI), approve (a pull request review, `chant approve` or `chant run approve`), override a policy denial (`chant approve policy-override`), or merge; never cut or publish a release (`chant release cut --yes` or `chant release publish`), push or delete a `ci/*` tag (`chant ci tick` pushes them), or change the value of an existing flag; never touch `.chant/allowed_signers` or `chant/lifecycle`.

Proof

Example projects in the chant repository for this room, each with a README that has the commands to run it. The last rows count the examples each lexicon ships, read from the repository when this site was built.

ExampleWhere
getting-started lexicons/terraform/examples/getting-started
workspace-member lexicons/pulumi/examples/workspace-member
plunge-member lexicons/pulumi/examples/plunge-member
4 examples lexicons/terraform/examples
3 examples lexicons/pulumi/examples

Then read

Tasks
Terraform getting startedPulumi getting startedRun a root on choudoufuA member on plunge
Background
Works withLifecycle Models
Reference
Terraform lexiconPulumi lexiconWorkspace kinds

chant