From 42919f3926f26453e44e11990c08f038edc521b7 Mon Sep 17 00:00:00 2001 From: Maksym Vlasov Date: Fri, 5 Apr 2024 22:05:35 +0300 Subject: [PATCH] docs: Document that `__GIT_WORKING_DIR__` available for `terraform_trivy` (#654) --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 346203435..96b987a60 100644 --- a/README.md +++ b/README.md @@ -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]