mirror of
https://github.com/tofuutils/pre-commit-opentofu.git
synced 2025-10-15 17:38:54 +02:00
docs: Clarify docs for terraform_tfsec hook (#266)
This commit is contained in:
parent
cff42e6d6f
commit
3d5a882a53
1 changed files with 11 additions and 3 deletions
14
README.md
14
README.md
|
|
@ -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]
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue