tf-drift scans every discovered Terraform layer after -dir, -env, and -layer filtering. Users need one more narrowing step: interactive users should be able to tick the detected configs they want to check, and CI users should be able to include or exclude configs with flags.
Add selection in two surfaces:
-include and -exclude flags for comma-separated suffix or glob patterns.Selection applies before the worker pool starts. The existing scanning, reporting, exit-code, and detail-inspector behavior stays unchanged once the selected list is built.
The diagram shows selection as a shared step between discovery and scanning.
The interactive picker defaults every discovered config to selected. Keyboard controls:
space: tick or untick the current config.a: select all configs.n: select none.enter: start scanning selected configs.q or ctrl+c: quit without scanning.If the user presses enter with no configs selected, the picker stays open and shows Select at least one config.
-include and -exclude accept comma-separated patterns. Patterns match config base names, relative suffixes, and slash-separated path suffixes. Include runs first, then exclude.
Examples:
tf-drift -dir examples -non-interactive -include "clean-empty,drift-*"
tf-drift -dir examples -non-interactive -exclude "error-*"
-include and -exclude.go test ./..., go vet ./..., and make build.-include and -exclude to verify selected statuses.