feat: Change terraform-format to support both Terraform and OpenTofu packages#419
Conversation
7b901bb to
59000fb
Compare
50e6472 to
b112f79
Compare
modules/hooks.nix
Outdated
| terraform-fmt = pkgs.writeScriptBin "terraform-fmt" '' | ||
| #!/usr/bin/env bash | ||
|
|
||
| opentofu_or_terraform() { |
There was a problem hiding this comment.
@totoroot Based on our discussion, I made a few changes to the existing terraform-format. For the time being, I feel it would be easier to alter the existing hook to work with both OpenTofu and Terraform. End users can choose whether to use OpenTofu (the default) or alter the package to Terraform, as shown in this example:
https://github.com/sestrella/test-pre-commit-hooks.nix/blob/main/devenv.nix
I'm planning to update the PR title and the issue accordingly.
terraform-format to support both Terraform and OpenTofu packages
e752c46 to
4696ed5
Compare
|
@domenkozar I just resolved the conflicts on this branch and updated the repo I was using for testing; so far, it appears to be working properly: Would you mind taking a look, please? Reference: https://github.com/sestrella/test-pre-commit-hooks.nix/actions/runs/12173105536/job/33952913600 |
35b95bc to
b1fa507
Compare
|
I refactored the |
Fixes #418