cachix / git-hooks.nix

Seamless integration of https://pre-commit.com git hooks with Nix.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change `terraform-format` to support both Terraform and OpenTofu packages

sestrella opened this issue · comments

Right now, the terraform-fmt hook uses OpenTofu under the hood, which is a little misleading given the hook name. On the other hand, the use of OpenTofu over Terraform may be something to leave to the end user to decide. In that regard, I suggest creating two separate hooks, one that uses Terraform and another that uses OpenTofu.

The initial proposal was to create separate hooks, but after @totoroot comment, I realized it would be better to modify the existing hook to support both Terraform and OpenTofu, allowing end users to make the final decision while also avoiding inserting weird hacks into the existing GH actions workflow to make it work with unfree packages, which was required to make it work with Terraform due to the most recent license change.