Here's where we'll put some example base terraform modules and best practices.
We'll be using pre-commit-terraform to keep the code tidy!
The precommit hooks help with:
- formatting the code
- validating the code
- linting the code
- documenting the code
- security scanning, probably...?
- maybe even infra cost checking 🤷
- tflint
- jq
- terraform-docs
- pre-commit
- checkov (I haven't tested this one)
- infracost (not tested)
To install the pre-commit hooks for this repo use:
# initialize terraform for the first time
terraform init
# run this from the root directory of the repo
pre-commit install
To test the pre-commit hooks for this repo use:
# run this from the root directory of the repo
pre-commit run