Skip to content

tfcensus report scan ​

scan prints the per-account counts of a scan and its top findings, double-managed first, then unmanaged. --category lists another category instead.

With --from it reads a file from tfcensus scan --format json. Without it, it reads the newest snapshot in the scan cache and applies the current ownership rules to it, with no AWS call. A snapshot older than cache.ttl is used anyway, with a warning. It is what the scan_summary tool of tfcensus mcp returns.

Usage ​

sh
tfcensus report scan [flags]

Flags ​

FlagDescriptionTypeDefaultValuesConfig keyNotes
--accountAWS account IDstringaccounts.include
--categorylist this category: managed, double-managed, unmanaged, other-iac, aws-managed, derived, ignored or undetermined (default: double-managed and unmanaged)stringmanaged: one state manages it
double-managed: more than one state manages it
unmanaged: no state manages it
other-iac: CloudFormation, CDK, Pulumi or a Kubernetes controller owns it
aws-managed: AWS created it, or it is a default
derived: a child of a managed or derived resource
ignored: an ownership rule ignores it
undetermined: type unmapped, or the layer data is not enough
--fromscan JSON (default: the newest scan cache snapshot)string
--regionAWS region, or globalstring35 values; shell completion lists themregions
--topfindings to list, 1 to 500int50
--typeCloudFormation or layer type glob, such as AWS::EC2::*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 ​

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 scan --from scan.json --account 111111111111 --top 20
tfcensus report scan --category undetermined