Automate
Sharing reports
infraglass export turns a state, a plan and any recorded runs into something you can share.
A single HTML file
infraglass export --dir . --plan-file tfplan -o plan.html
The file is the full viewer, with graph, table, timeline and details, and the data built in. It
opens from disk or as a CI artifact with no server and no network. Its Content-Security-Policy
allows only its own code, by hash. Sensitive values are hidden and account IDs masked, as in the
live viewer. The file is written with mode 0600, so you decide who sees it.
Include runs to show how an apply went:
infraglass export --dir . --run .infraglass/runs -o apply.html
Provisioner output and diagnostic messages (Terraform's error and warning text, summaries as
well as details) can quote anything a script printed or a provider returned. A report leaves
them out by default and says so, and keeps what failed, where and with what severity. Add
--include-run-output to keep them.
Warning
Every kept line still goes through the secret scrubber, but treat a report made with
--include-run-outputas sensitive.
A Markdown summary
infraglass export --dir . --plan-file tfplan --format markdown > plan.md
For a plan, it gives the totals and a table of every create, update, replace and delete, with the attributes behind each replacement. It also lists any access findings, and how each included run went. Values from Terraform are escaped, so nothing in a resource name can break the table.
JSON for tools
infraglass export --dir . --plan-file tfplan --format json -o report.json
The infraglass.report/v1 document has the
summary, every change with its attribute paths (not values), risks, findings, drift, checks and
runs.
In a pipeline
infraglass check writes all three reports in one go and can fail the build on the gates you
choose. The repository is also a GitHub Action that comments on the pull request and uploads the
reports. See CI and pipelines, which also covers GitLab and Jenkins.