nctl scan terraform
nctl scan terraform
scan terraform resources
nctl scan terraform [flags]
Examples
# Basic scan with required resource and policy file
nctl scan terraform -r path/to/file -p path/to/policy
# Scan with audit mode enabled (violations reported as warnings)
nctl scan terraform -r path/to/file -p path/to/policy --audit-as-warn
# Scan with remediation suggestions displayed
nctl scan terraform -r path/to/file -p path/to/policy --remediate display
# Overwrite resource files with remediations
nctl scan terraform -r path/to/file -p path/to/policy --remediate overwrite
# Generate a scan report in JSON format
nctl scan terraform -r path/to/file -p path/to/policy -o json --scan-report scan-report.json
# Save scan results to a file
nctl scan terraform -r path/to/file -p path/to/policy --file output.txt
# Disable colored output in the terminal
nctl scan terraform -r path/to/file -p path/to/policy --no-color
Options
--audit-as-warn Report violations from policies in audit mode as warnings instead of failures
--details Show result details for violating resources
--file string Output file
-h, --help help for terraform
--insecure allow connection to an address with a self-signed or non-verifiable certificate (not recommended)
--no-color disable the colors for the stdout reports
-o, --output string Output format (text, json, yaml, scan-report) (default "text")
-p, --policies strings Path to policy files (local path, github URL, helm URL)
--publish Publish reports
--publish-token string scan reports publish token
--remediate string Remediate resources ('show', 'patch')
--report-sourceid string Add source id for report created for local scan
-r, --resources strings Path to resource files (local path, github URL)
--scan-report string Output scan report file (in JSON format)
--token string Nirmata API Login Key (env NIRMATA_TOKEN)
--url string Nirmata server base URL (env NIRMATA_URL)
Options inherited from parent commands
-v, --v Level log level for V logs
SEE ALSO
- nctl scan - Scan resources