lowlydba/tofu-garnish
Generate a simple static HTML page from Tofu/Terraform outputs and publish it to GitHub Pages.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| outputs-file | Path to a JSON file of Tofu/Terraform outputs. Accepts the file from the `json_output_path` output of dflook/terraform-output and the output of `tofu output -json` / `terraform output -json`. | no | "" |
| outputs | Inline JSON string of outputs. Use "toJson(steps.<id>.outputs)" in an expression on a dflook/terraform-output step. Ignored when outputs-file is set. | no | "" |
| workspaces | Multiline list of "name=path" pairs, one per line, for publishing several discrete output sets (workspaces, accounts, tenants) as one site. Each workspace gets its own page under /<name>/ plus a landing page linking them. When deploying, only the listed workspaces are overwritten; other workspaces already on the site are preserved. Takes precedence over outputs-file and outputs. | no | "" |
| module-dir | Path to the OpenTofu root module directory. When set, output descriptions are extracted from the module source with `tofu show -json -module=<dir>` and shown on the page. OpenTofu only: requires tofu >= 1.10 on PATH (Terraform's show command has no configuration mode). Applies to all listed workspaces. | no | "" |
| title | Title for the generated page. | no | Tofu Outputs |
| source-repo-url | URL of the repository containing the Tofu/Terraform configuration the outputs come from. Rendered as a "source repository" link on every generated page. Set to "" to omit the link. | no | ${{ github.server_url }}/${{ github.repository }} |
| footer | Whether to render the "Served with 💚 by 🌿 tofu-garnish" footer, which links to the tofu-garnish repository, on generated pages. Set to "false" to omit it. | no | true |
| output-dir | Directory the generated site is written to. Only used when deploy is "false"; deploys generate into a temporary directory. | no | tofu-garnish-site |
| deploy | Whether to commit the site to the Pages branch. Set to "false" to only generate the HTML into output-dir. | no | true |
| pages-branch | Branch GitHub Pages serves from. Created if it doesn't exist. | no | gh-pages |
| github-token | Token used to read and push the Pages branch. Needs contents write access to this repository. | no | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| page-url | URL of the GitHub Pages site (empty when deploy is false). |
| site-dir | Directory containing the generated index.html. |