pre-commit-terraform VS pre-commit-hooks

Compare pre-commit-terraform vs pre-commit-hooks and see what are their differences.

pre-commit-terraform

pre-commit git hooks to take care of Terraform configurations 🇺🇦 (by antonbabenko)

pre-commit-hooks

Some out-of-the-box hooks for pre-commit (by pre-commit)
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
pre-commit-terraform pre-commit-hooks
15 25
3,235 5,389
- 1.3%
8.7 7.3
21 days ago about 1 month ago
Shell Python
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

pre-commit-terraform

Posts with mentions or reviews of pre-commit-terraform. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-09-06.
  • How to Estimate Cloud Costs with Terraform and InfraCost
    5 projects | dev.to | 6 Sep 2024
    repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/antonbabenko/pre-commit-terraform rev: v1.72.2 hooks: - id: terraform_fmt - id: terraform_tflint - id: infracost_breakdown args: - --args=--path=./ verbose: true # Always show costs - id: terraform_validate
  • Infrastructure Essentials Part 1: A Terraform Recipe for Success
    3 projects | dev.to | 28 Jun 2024
    repos: # pre-commit install --hook-type pre-push - repo: https://github.com/pre-commit/pre-commit-hooks # Generic review/format rev: v4.6.0 hooks: - id: end-of-file-fixer - id: no-commit-to-branch args: ["--branch", "master"] - id: trailing-whitespace - repo: https://github.com/igorshubovych/markdownlint-cli # Format markdown rev: v0.40.0 hooks: - id: markdownlint args: ["--fix", "--disable", "MD036"] - repo: https://github.com/antonbabenko/pre-commit-terraform rev: v1.89.1 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases hooks: - id: terraform_fmt - id: terraform_tflint - id: terraform_validate args: - --args=-json - --args=-no-color - id: terraform_docs args: - --hook-config=--path-to-file=README.md - --hook-config=--add-to-existing-file=true
  • whats your development process for github actions and how are you testing them?
    3 projects | /r/devops | 9 Mar 2023
    Personally I use pre-commit with some of these hooks in addition to some default hooks. It's basically a localised CI pipeline, and also means every commit has passed checks so keeps your commit history neat. Way faster to develop infrastructure code and fix issues than having to keep pushing to the remote repo and waiting for an Action to run.
  • Breve guia de sobrevivência com Terraform
    11 projects | dev.to | 22 Dec 2022
  • Trying to learn pre-commit - how to handle multiple hooks in a small monorepo with different paths?
    1 project | /r/devops | 16 Oct 2022
  • List of most useful Terraform open-source tools
    14 projects | /r/Terraform | 28 Aug 2022
    https://github.com/antonbabenko/pre-commit-terraform because Terraform/Terragrunt configs should be documented, tidy and valid all the time :)
  • Terraform Module Template
    13 projects | /r/devops | 19 Jul 2022
    Local testing with pre-commit-terraform. Formats code with terraform fmt Validates code with terraform validate Automatic README updates with terraform-docs. Static code analysis with TFLint, tfsec and checkov.
  • Hugo no theme
    5 projects | dev.to | 17 Jul 2022
    diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ca47c31..3e5cfef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,10 @@ repos: rev: v2.7.1 hooks: - id: prettier - types_or: [yaml, markdown, json] + types_or: [yaml, markdown, json, html] + additional_dependencies: + - "[email protected]" + - "[email protected]" - repo: https://github.com/antonbabenko/pre-commit-terraform rev: v1.74.1 hooks:
  • Terraform Best Practices for Better Infrastructure Management
    9 projects | dev.to | 15 May 2022
    pre-commit-terraform – Pre-commit git hooks for automation
  • Using pre-commits hooks to improve terraform IaC code quality
    2 projects | /r/Terraform | 26 Oct 2021
    Let me share a shameless plug (as an author of the pre-commit-terraform). I will show these hooks in action and answer questions during my live stream on Friday 29th of October - https://www.youtube.com/watch?v=ziJK79tI6tY

pre-commit-hooks

Posts with mentions or reviews of pre-commit-hooks. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-09-06.
  • How to Estimate Cloud Costs with Terraform and InfraCost
    5 projects | dev.to | 6 Sep 2024
    repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/antonbabenko/pre-commit-terraform rev: v1.72.2 hooks: - id: terraform_fmt - id: terraform_tflint - id: infracost_breakdown args: - --args=--path=./ verbose: true # Always show costs - id: terraform_validate
  • Infrastructure Essentials Part 1: A Terraform Recipe for Success
    3 projects | dev.to | 28 Jun 2024
    repos: # pre-commit install --hook-type pre-push - repo: https://github.com/pre-commit/pre-commit-hooks # Generic review/format rev: v4.6.0 hooks: - id: end-of-file-fixer - id: no-commit-to-branch args: ["--branch", "master"] - id: trailing-whitespace - repo: https://github.com/igorshubovych/markdownlint-cli # Format markdown rev: v0.40.0 hooks: - id: markdownlint args: ["--fix", "--disable", "MD036"] - repo: https://github.com/antonbabenko/pre-commit-terraform rev: v1.89.1 # Get the latest from: https://github.com/antonbabenko/pre-commit-terraform/releases hooks: - id: terraform_fmt - id: terraform_tflint - id: terraform_validate args: - --args=-json - --args=-no-color - id: terraform_docs args: - --hook-config=--path-to-file=README.md - --hook-config=--add-to-existing-file=true
  • Setting up `pre-commit` in a Django project
    4 projects | dev.to | 28 Jun 2024
    # .pre-commit-config.yaml (28.06.2024) repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-added-large-files - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black rev: 24.4.2 hooks: - id: black - repo: https://github.com/pycqa/flake8 rev: 7.1.0 hooks: - id: flake8 - repo: local hooks: - id: django-check name: Run Django Check entry: python manage.py check language: system pass_filenames: false types: [python]
  • Implementing Quality Checks In Your Git Workflow With Hooks and pre-commit
    6 projects | dev.to | 13 Dec 2023
    # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.2.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-toml - id: check-added-large-files - repo: local hooks: - id: tox lint name: tox-validation entry: pdm run tox -e test,lint language: system files: ^src\/.+py$|pyproject.toml|^tests\/.+py$ types_or: [python, toml] pass_filenames: false - id: tox docs name: tox-docs language: system entry: pdm run tox -e docs types_or: [python, rst, toml] files: ^src\/.+py$|pyproject.toml|^docs\/ pass_filenames: false - repo: https://github.com/pdm-project/pdm rev: 2.10.4 # a PDM release exposing the hook hooks: - id: pdm-lock-check - repo: https://github.com/jumanjihouse/pre-commit-hooks rev: 3.0.0 hooks: - id: markdownlint
  • How to Write Impeccably Clean Code That Will Save Your Sanity
    7 projects | dev.to | 27 Jul 2023
    repos: - repo: https://github.com/ambv/black rev: 23.3.0 hooks: - id: black args: [--config=./pyproject.toml] language_version: python3.11 - repo: https://github.com/pycqa/flake8 rev: 6.0.0 hooks: - id: flake8 args: [--config=./tox.ini] language_version: python3.11 - repo: https://github.com/pycqa/isort rev: 5.12.0 hooks: - id: isort args: ["--profile", "black", "--filter-files"] language_version: python3.11 - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 hooks: - id: requirements-txt-fixer language_version: python3.11 - id: debug-statements - id: detect-aws-credentials - id: detect-private-key
  • Setting Up Pre-Commit Hooks in GitHub: Ensuring Code Quality and Consistency
    4 projects | dev.to | 11 Jul 2023
    repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: hooks: - id: check-json
  • Level up your development in Git
    3 projects | dev.to | 3 Jun 2023
    $ pre-commit run --all-files [INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Initializing environment for https://github.com/psf/black. [INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... [INFO] Installing environment for https://github.com/psf/black. [INFO] Once installed this environment will be reused. [INFO] This may take a few minutes... Check Yaml...............................................................Passed Fix End of Files.........................................................Passed Trim Trailing Whitespace.................................................Failed - hook id: trailing-whitespace - exit code: 1 Files were modified by this hook. Additional output: Fixing sample.py black....................................................................Passed
  • What happens when you leak AWS credentials and how AWS minimizes the damage
    3 projects | news.ycombinator.com | 6 Apr 2023
    The excellent pre-commit framework (https://pre-commit.com/) has a hook for that in its official hook collection: https://github.com/pre-commit/pre-commit-hooks#detect-aws-cr...
  • Improve your Django Code with pre-commit
    13 projects | dev.to | 5 Apr 2023
    exclude: .*migrations\/.* repos: - repo: https://github.com/pre-commit/pre-commit-hooks ... - repo: https://github.com/psf/black rev: 22.12.0 hooks: - id: black language_version: python3.9
  • ChatGPT based PR Reviewer and Summarizer (GH Action)
    2 projects | /r/sre | 12 Mar 2023
    This is what we use — https://github.com/pre-commit/pre-commit-hooks/blob/main/pre_commit_hooks/detect_private_key.py

What are some alternatives?

When comparing pre-commit-terraform and pre-commit-hooks you can also consider the following projects:

plantuml-githook - A Git hook which spots PlantUML source files and generates diagrams in a structured way

bandit - Bandit is a tool designed to find common security issues in Python code.

checkov - Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages with Checkov by Bridgecrew.

pyupgrade - A tool (and pre-commit hook) to automatically upgrade syntax for newer versions of the language.

tfsec - Security scanner for your Terraform code [Moved to: https://github.com/aquasecurity/tfsec]

terragrunt - Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale.

terraform-docs - Generate documentation from Terraform modules in various output formats

atlantis - Terraform Pull Request Automation

tflint - A Pluggable Terraform Linter

terraform-provider-sops - A Terraform provider for reading Mozilla sops files

codespell - check code for common misspellings

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured

Did you konow that Shell is
the 11th most popular programming language
based on number of metions?