Created
April 7, 2021 13:22
-
-
Save nmarchini/1aba684d2198062c9f7b29e9c1ae8cbc to your computer and use it in GitHub Desktop.
WIP pre-commit for terraform testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# yamllint disable rule:line-length | |
default_language_version: | |
python: python3.8 | |
repos: | |
- repo: git://github.com/pre-commit/pre-commit-hooks | |
rev: v3.4.0 | |
hooks: | |
- id: check-json | |
- id: check-merge-conflict | |
- id: trailing-whitespace | |
- id: end-of-file-fixer | |
- id: check-yaml | |
- id: check-added-large-files | |
- id: pretty-format-json | |
args: | |
- --autofix | |
- id: detect-aws-credentials | |
args: | |
- --allow-missing-credentials | |
- id: detect-private-key | |
# - repo: git://github.com/igorshubovych/markdownlint-cli | |
# rev: v0.27.1 | |
# hooks: | |
# - id: markdownlint | |
- repo: git://github.com/adrienverge/yamllint | |
rev: v1.26.0 | |
hooks: | |
- id: yamllint | |
name: yamllint | |
description: This hook runs yamllint. | |
entry: yamllint | |
language: python | |
types: [file, yaml] | |
- repo: git://github.com/jameswoolfenden/pre-commit | |
rev: v0.1.46 | |
hooks: | |
- id: terraform-fmt | |
language_version: python3.8 | |
- id: tf2docs | |
language_version: python3.8 | |
- repo: git://github.com/bridgecrewio/checkov | |
rev: 1.0.865 | |
hooks: | |
- id: checkov | |
verbose: true | |
entry: checkov -d example/examplea --external-checks-dir checkov | |
- repo: https://github.com/tfsec/tfsec | |
rev: v0.39.20 | |
hooks: | |
- id: tfsec | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good one , a must add-on on TF pipelines as well