2016-09-27 20:01:11 +02:00
# pre-commit-terraform hook
2016-09-27 19:47:26 +02:00
2018-01-03 22:26:39 -06:00
[](https://www.codetriage.com/antonbabenko/pre-commit-terraform)
2018-01-15 16:12:51 +01:00
Single [pre-commit ](http://pre-commit.com/ ) hook which runs `terraform fmt` on Terraform configuration files (both `*.tf` and `*.tfvars` ).
2016-09-27 19:47:26 +02:00
An example `.pre-commit-config.yaml` :
```yaml
2018-01-15 16:12:51 +01:00
- repo: git://github.com/antonbabenko/pre-commit-terraform
sha: v1.3.0
hooks:
- id: terraform_fmt
2016-09-27 19:47:26 +02:00
```
2016-09-27 20:01:11 +02:00
Enjoy the clean code!