tfcensus report html
html writes one HTML file from the JSON that scan, drift and audit print with --format json. The CSS and JavaScript are inside the file and a Content-Security-Policy blocks every network request, so it opens offline and can be attached to a CI run.
The newest scan fills the scan section, with filters per account, category and type. With two or more scan files, every scan becomes a point of a coverage trend. The newest drift and audit files fill their sections. Drift shows attribute paths only, never values, even when the drift JSON was written with --show-attributes.
The same input files always give the same bytes.
Usage
sh
tfcensus report html [flags]Flags
| Flag | Description | Type | Default | Values | Config key | Notes |
|---|---|---|---|---|---|---|
--from | scan, drift or audit JSON file (repeatable; .gz and .zst work) | string, repeatable | ||||
-o, --output | file to write, or - for stdout | string | - |
The global flags work with every command.
Output formats
This command ignores --format.
Exit codes
| Code | Meaning |
|---|---|
| 0 | The command finished. With --fail-on, nothing matched. |
| 1 | The command failed: a read, a write, a child process or a check failed. |
| 2 | Wrong usage: an unknown command or flag, a bad value or argument, an invalid config file, or a prompt with no terminal. |
| 130 | Interrupted by Ctrl-C (SIGINT) or a cancelled context. |
All codes are listed on the exit codes page.
Examples
sh
tfcensus report html --from scan.json -o census.html
tfcensus report html --from scan-2026-11-01.json --from scan.json --from drift.json --from audit.json -o census.html