discover
discover provides an optional live AWS inventory for an assessment. The resulting inventory is written to OUTPUT/review/aws-inventory.json; a subsequent assessment can compare it to the Terraform source.
Show collection commands
Section titled “Show collection commands”stacktoit discover commandsstacktoit discover commands --format shThe output describes read-only AWS CLI commands and the data they collect. The shell format prints a collection script; it does not execute those commands itself.
Collect using your AWS CLI
Section titled “Collect using your AWS CLI”stacktoit discover aws ./terraform-stacktoit --region eu-central-1Multiple regions can be selected by repeating --region. You can also select an AWS CLI profile with --profile NAME.
Import existing inventory
Section titled “Import existing inventory”AWS CLI output files:
stacktoit discover import aws-cli ./aws-collection ./terraform-stacktoitAWS Config advanced-query result:
stacktoit discover import aws-config ./aws-config.json ./terraform-stacktoitUse --captured-at with an RFC 3339 timestamp if you know the collection time. Use --replace only when replacing an existing inventory intentionally.
Compare with the Terraform source
Section titled “Compare with the Terraform source”stacktoit assess ./terraform ./terraform-stacktoitNormal assess does not require AWS credentials and does not query AWS APIs. discover aws uses the operator’s AWS CLI credentials. Missing, incomplete, denied or throttled inventory reads are reported as such, not interpreted as evidence that resources are absent.