Closed zimbatm closed 1 year ago
I found the issue, it only takes one path as an argument.
If you want to help, please :+1: this upstream PR: https://github.com/hashicorp/terraform/pull/28191
Another workaround is to use hclfmt:
[formatter.hcl]
command = "hclfmt"
options = [
"-w" # write in place
]
includes = ["*.hcl", "*.tf"]
Note that hclfmt isn't widely distributed. I didn't find it in Homebrew or nixpkgs.
Here is the nix package: https://github.com/NixOS/nixpkgs/pull/182472
@zimbatm Terraform v1.13 got released today and terraform fmt
takes a list of files now.
finally!
terraform fmt
doesn't obey the treefmt spec