New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hook to sort definition blocks in HCL files #446
Comments
That pretty much looks like the current terraform_docs realization, jfyi. So will be a good idea to look into it to understand how to +- do the same as a standalone hook. |
@yermulnik when using your tf_vars_sort.awk I am getting the following:
|
@oviliz be sure that you use |
@oviliz https://gist.github.com/yermulnik/7e0cf991962680d406692e1db1b551e6
|
What problem are you facing?
A while ago
before orcs groundlessly and treacherously come against Ukrainewhile I was poking around some TF issue I stumbled upon this thread about sorting Terraform files and created a tiny AWK script to achieve the goal of sorting definition blocks in.tf
files.And now I had a thought that someone may find it useful and may want to create a
pre-commit-terraform
hook to benefit from it (I don't actually heavily use either and thus I'm not sure I'd be able to allocate some reasonable amount of time for this).So if there are any volunteers to pick this task up, I'd be happy to assist as much as time permits.
Thanks in advance for the contribution and effort 🙇🏻
How could pre-commit-terraform help solve your problem?
Sorting definition blocks in
*.tf
files may make your code more beautiful and clear. Or may not 😏The text was updated successfully, but these errors were encountered: