Skip to content

Commit

Permalink
docs: Clarify docs for terraform_tfsec hook (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxymVlasov authored Oct 26, 2021
1 parent cff42e6 commit 3d5a882
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,21 @@ Example:
--no-color
-e aws-s3-enable-bucket-logging,aws-s3-specify-public-access-block
```
4. Like terraform_tflint, `__GIT_WORKING_DIR__` can be used when specifying files relative to the git working directory:
Example:
4. When you have multiple directories and want to run `tfsec` in all of them and share a single config file - use the `__GIT_WORKING_DIR__` placeholder. It will be replaced by `terraform_tfsec` hooks with Git working directory (repo root) at run time. For example:
```yaml
- id: terraform_tfsec
args:
- --args=--config-file=__GIT_WORKING_DIR__/.tfsec.json
```
Otherwise, will be used files that located in sub-folders:
```yaml
- id: terraform_tfsec
args: [--args=--config-file=__GIT_WORKING_DIR__/.tfsec.json]
args:
- --args=--config-file=.tfsec.json
```
### terraform_validate
Expand Down

0 comments on commit 3d5a882

Please sign in to comment.