Running "terraform fmt" as pre-commit git hook [archived]

This is my second blog post related to Terraform. Previous one was about how I structure Terraform configuration, which got some interesting feedback on reddit.

This time I want to share pre-commit hook which runs "terraform fmt" on your Terraform configuration files. Nothing more, nothing less.

Code is here - antonbabenko/pre-commit-terraform