tfcensus report drift
drift lists the drifted and failed units of a file from tfcensus drift --format json, and their drifted resources with attribute paths, never values. It runs no plan. It is what the drift_summary tool of tfcensus mcp returns.
Usage
sh
tfcensus report drift [flags]Flags
| Flag | Description | Type | Default | Values | Config key | Notes |
|---|---|---|---|---|---|---|
--from | drift JSON from tfcensus drift --format json | string | ||||
--status | unit status: drifted, failed, clean, early-exit or excluded (default drifted and failed) | string | drifted: at least one change that no noise rule hidesfailed: the plan failed, is missing or can't be readclean: no drift, or only hidden driftearly-exit: a dependency failed, so terragrunt skipped itexcluded: an exclude block or a filter skipped it | |||
--unit | unit path glob, * matches / too | string |
The global flags work with every command.
Output formats
--format accepts tty, plain, json. Without it, the format is tty when stdout is a terminal and plain otherwise. Formats are described on the global flags page.
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 drift --from drift.json --unit 'acme-live/prod/*'