Skip to content

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 ​

FlagDescriptionTypeDefaultValuesConfig keyNotes
--fromdrift JSON from tfcensus drift --format jsonstring
--statusunit status: drifted, failed, clean, early-exit or excluded (default drifted and failed)stringdrifted: at least one change that no noise rule hides
failed: the plan failed, is missing or can't be read
clean: no drift, or only hidden drift
early-exit: a dependency failed, so terragrunt skipped it
excluded: an exclude block or a filter skipped it
--unitunit path glob, * matches / toostring

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 ​

CodeMeaning
0The command finished. With --fail-on, nothing matched.
1The command failed: a read, a write, a child process or a check failed.
2Wrong usage: an unknown command or flag, a bad value or argument, an invalid config file, or a prompt with no terminal.
130Interrupted 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/*'