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
.tfroots 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 upstill 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 githubwrites the pull-request workflow under.github/workflows/, run onpull_requestand onpushto 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.
--generate gitlabwrites.gitlab-ci.yml, andapplyruns one at a time per environment throughresource_group.- A CI job token cannot write merge request notes, so set a project access token with the
apiscope as the masked variableCHANT_FORGE_TOKEN.
--generate forgejowrites the GitHub workflow in the Forgejo dialect under.forgejo/workflows/: the runner label, action references by URL, and nopermissionsblock.- Forgejo workflows are GitHub-dialect, so
chant auditapplies its GitHub rules to them.
First step
For a Pulumi program, install @intentius/chant-lexicon-pulumi instead.
npm install --save-dev @intentius/chant-lexicon-terraformShow 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.
| Example | Where |
|---|---|
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 |