diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2dec635..3a012c9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,16 +1,32 @@ repos: - - repo: https://github.com/squareops/pre-commit - rev: v0.1.12 - hooks: - - id: terraform-fmt - - id: terraform-validate - - id: tflint - - repo: https://github.com/squareops/pre-commit-terraform - rev: v1.47.0 - hooks: - - id: terraform_docs - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.1.0 hooks: + - id: trailing-whitespace + args: ['--markdown-linebreak-ext=md'] + - id: end-of-file-fixer - id: check-merge-conflict - # - id: end-of-file-fixer \ No newline at end of file + - id: detect-private-key + - id: detect-aws-credentials + args: ['--allow-missing-credentials'] + - repo: https://github.com/antonbabenko/pre-commit-terraform + rev: v1.77.0 + hooks: + - id: terraform_fmt + - id: terraform_docs + args: + - '--args=--lockfile=false' + - --hook-config=--add-to-existing-file=true + - --hook-config=--create-file-if-not-exist=true + + - id: terraform_tflint + args: + - --args=--config=.tflint.hcl + - id: terraform_tfsec + files: ^examples/ # only scan `examples/*` which are the implementation + args: + - --args=--config-file=__GIT_WORKING_DIR__/tfsec.yaml + - --args=--format + - --args=html + - --args=--out + - --args=../../../tfsec.html