pre-commit-terraform VS terragrunt

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

pre-commit-terraform

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

terragrunt

Terragrunt is a flexible orchestration tool that allows Infrastructure as Code written in OpenTofu/Terraform to scale. (by gruntwork-io)
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
pre-commit-terraform terragrunt
15 63
3,235 8,115
- 0.9%
8.7 9.6
22 days ago 5 days ago
Shell Go
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

terragrunt

Posts with mentions or reviews of terragrunt. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-10-07.
  • The main steps I follow when kicking off Node.js projects
    12 projects | dev.to | 7 Oct 2024
    Terraform. I use it to manage infrastructure. It simplifies many things if at least a few people work on a project. As the project grows, it becomes massive, and maybe for better state management, you will need tools like Terragrunt to keep infrastructure-related code simple. If you use AWS as a cloud provider, you can also use AWS CDK. It’s a nice tool with Typescript support, but it’s available only for AWS, and if you need something from a different cloud infrastructure, the code will be much more complex than Terraform. That’s why I prefer the Terraform even for AWS.
  • Building Auth0 Actions in TypeScript
    3 projects | dev.to | 4 Sep 2024
    You need to ensure your Action code is built before you attempt a terrform plan or apply. In our case we are using terragrunt which has a helpful before_hook, setup in the terragrunt.hcl file as follows:
  • Show HN: Burrow is a globally distributed, serverless HTTP proxy
    5 projects | news.ycombinator.com | 27 Jul 2024
    https://github.com/hashicorp/terraform/issues/19932

    My understanding is that people that have this as a first-class concern use something like Terragrunt to dynamically generate the HCL as needed.

    https://terragrunt.gruntwork.io/

    For Burrow here, I was was focused on shipping something and didn't want to spend time on generating that code just yet. But the project has gotten some attention so if this is a recurring request I'll probably do it.

    Note that I intentionally chose the 17 AWS regions that are default enabled in every new AWS account, so it should only be if you want to customize it that this becomes important.

    A Cloudformation Stacks based deployment to achieve multi-region would be another good (and perhaps better) option here. I could add that to the Makefile, with inspiration from your link there.

  • Tenv v2.0: The Importance of Explicit Behavior for Version Manager
    9 projects | dev.to | 2 Jul 2024
    Terragrunt started to use OpenTofu as the default IAC tool, however, this was not a major release; instead, it was provided as a patch and users didn't expect to have any differences in the behavior. The original problem may be found here.
  • Terragrunt Tutorial – Getting Started & Examples
    2 projects | dev.to | 6 Jun 2024
    Next, head over to the Terragrunt GitHub page to download it.
  • How to Manage Multiple Terraform Environments Efficiently
    1 project | dev.to | 6 May 2024
    Terragrunt is a Terraform wrapper, designed to fill in the gaps when it comes to large scale Terraform configurations.
  • Deploying a Containerized App to ECS Fargate Using a Private ECR Repo & Terragrunt
    1 project | dev.to | 22 Apr 2024
  • Top Terraform Tools to Know in 2024
    19 projects | dev.to | 26 Mar 2024
    ‍Terragrunt is a thin wrapper that provides extra tools for keeping your Terraform configurations DRY (Don't Repeat Yourself), working with multiple Terraform modules, and managing remote state. It's particularly useful in managing large-scale infrastructure deployments with Terraform.
  • DevSecOps with AWS- IaC at scale - Building your own platform - Part 1
    8 projects | dev.to | 21 Mar 2024
  • Self-service infrastructure as code
    4 projects | dev.to | 12 Mar 2024
    Our first attempt was to introduce other engineering teams to Terraform - the Platform team was already using it extensively with Terragrunt, and using Atlantis to automate plan and apply operations in a Git flow to ensure infrastructure was consistent. We'd written modules, with documentation, and an engineer would simply need to raise a PR to use the module and provide the right values, and Atlantis (once the PR was approved by Platform) would go ahead and set it up for them.

What are some alternatives?

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

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

terraform-cdk - Define infrastructure resources using programming constructs and provision them using HashiCorp Terraform

pre-commit-hooks - Some out-of-the-box hooks for pre-commit

terraform - Terraform enables you to safely and predictably create, change, and improve infrastructure. It is a source-available tool that codifies APIs into declarative configuration files that can be shared amongst team members, treated as code, edited, reviewed, and versioned.

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

Pulumi - Pulumi - Infrastructure as Code in any programming language 🚀

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

LocalStack - đź’» A fully functional local AWS cloud stack. Develop and test your cloud & Serverless apps offline

atlantis - Terraform Pull Request Automation

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

terratest - Terratest is a Go library that makes it easier to write automated tests for your infrastructure code.

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