Skip to content

Commit

Permalink
docs(terraform): make jq default
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmithv11 authored Aug 21, 2023
1 parent 984d2da commit 0d5b549
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions docs/7.Scan Examples/Terraform Plan Scanning.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,11 @@ Checkov supports the evaluation of policies on resources declared in `.tf` files
```json
terraform init
terraform plan --out tfplan.binary
terraform show -json tfplan.binary > tfplan.json
terraform show -json tfplan.binary | jq > tfplan.json

checkov -f tfplan.json
```

Note: The Terraform show output file `tf.json` will be a single line. For that reason Checkov will report all findings as line number 0.
If you have installed jq, you can convert a JSON file into multiple lines making it easier to read the scan result.

```json
terraform show -json tfplan.binary | jq '.' > tfplan.json

checkov -f tfplan.json
```

The output would look like:
```
Expand Down

0 comments on commit 0d5b549

Please sign in to comment.