Skip to content

Exit codes ​

CodeNameMeaning
0okThe command finished. With --fail-on, nothing matched.
1errorThe command failed: a read, a write, a child process or a check failed.
2usageWrong usage: an unknown command or flag, a bad value or argument, an invalid config file, or a prompt with no terminal.
3findingsA --fail-on gate matched. The report is still written.
4authCredentials were missing or rejected for every source the command needed.
130interruptedInterrupted by Ctrl-C (SIGINT) or a cancelled context.

When more than one applies, the first error decides the code. A --fail-on match (3) is reported after the report is written.

Per command ​

CommandExit codes
tfcensus audit backend0, 1, 2, 3, 4, 130
tfcensus cache clear0, 1, 2, 130
tfcensus cache info0, 1, 2, 130
tfcensus codify0, 1, 2, 130
tfcensus config init0, 1, 2, 130
tfcensus config path0, 1, 2, 130
tfcensus config show0, 1, 2, 130
tfcensus config validate0, 1, 2, 130
tfcensus doctor0, 1, 2, 4, 130
tfcensus drift0, 1, 2, 3, 130
tfcensus inventory0, 1, 2, 4, 130
tfcensus mcp0, 1, 2, 130
tfcensus move apply0, 1, 2, 3, 4, 130
tfcensus move mark-applied0, 1, 2, 3, 4, 130
tfcensus move plan0, 1, 2, 3, 4, 130
tfcensus move rollback0, 1, 2, 3, 4, 130
tfcensus move status0, 1, 2, 3, 4, 130
tfcensus move suggest0, 1, 2, 130
tfcensus notify0, 1, 2, 4, 130
tfcensus report audit0, 1, 2, 130
tfcensus report drift0, 1, 2, 130
tfcensus report html0, 1, 2, 130
tfcensus report inventory0, 1, 2, 130
tfcensus report scan0, 1, 2, 130
tfcensus report units0, 1, 2, 130
tfcensus rules test0, 1, 2, 130
tfcensus scan0, 1, 2, 3, 4, 130
tfcensus units0, 1, 2, 130
tfcensus version0, 1, 2, 130
tfcensus whois0, 1, 2, 3, 4, 130