diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..ce843a2 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: + - repo: https://github.com/gitleaks/gitleaks + rev: v8.16.1 + hooks: + - id: gitleaks + - repo: https://github.com/antonbabenko/pre-commit-terraform + rev: v1.81.0 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases + hooks: + - id: terraform_fmt + # - id: terraform_docs \ No newline at end of file diff --git a/Makefile b/Makefile index 4995b92..4721065 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ CODE_PATH ?= . +pre-commit: + @cd $(CODE_PATH) && pre-commit run --files * + init: @cd $(CODE_PATH) && terraform init -reconfigure -upgrade -backend-config=./backend.tfvars