docs: Clarify docs for terraform_tfsec hook (#266)

This commit is contained in:
Maksym Vlasov 2021-10-26 15:35:55 +03:00 committed by GitHub
commit 3d5a882a53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -470,13 +470,21 @@ Example:
--no-color --no-color
-e aws-s3-enable-bucket-logging,aws-s3-specify-public-access-block -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 ```yaml
- id: terraform_tfsec - id: terraform_tfsec
args: [--args=--config-file=__GIT_WORKING_DIR__/.tfsec.json] 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=.tfsec.json
``` ```
### terraform_validate ### terraform_validate