Skip to content

Commit

Permalink
docs: Document that __GIT_WORKING_DIR__ available for `terraform_tr…
Browse files Browse the repository at this point in the history
…ivy` (#654)
  • Loading branch information
MaxymVlasov authored Apr 5, 2024
1 parent d9addbe commit 42919f3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -883,6 +883,14 @@ To replicate functionality in `terraform_docs` hook:
- --args=--skip-dirs="**/.terraform"
```

4. When you have multiple directories and want to run `trivy` in all of them and share a single config file - use the `__GIT_WORKING_DIR__` placeholder. It will be replaced by `terraform_trivy` hooks with Git working directory (repo root) at run time. For example:

```yaml
- id: terraform_trivy
args:
- --args=--ignorefile=__GIT_WORKING_DIR__/.trivyignore
```

### terraform_validate

> [!IMPORTANT]
Expand Down

0 comments on commit 42919f3

Please sign in to comment.