Skip to content
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

tfsort support #501

Closed
jmreicha opened this issue Mar 18, 2023 · 3 comments
Closed

tfsort support #501

jmreicha opened this issue Mar 18, 2023 · 3 comments
Labels
estimate/1week Need 1 work week to be done feature New feature or request stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@jmreicha
Copy link

jmreicha commented Mar 18, 2023

What problem are you facing?

Having a way to automatically sort variables inside variables.tf files would be a very useful check/lint for organizing and cleaning up Terraform codebases. I would be curious if there are others out there that face this issue and wonder if it would be worth adding support for a tool to do this.

How could pre-commit-terraform help solve your problem?

From the tfsort project:

tfsort is a command-line utility designed for meticulous engineers who prefer to keep their Terraform variables and outputs sorted in alphabetical order.

tfsort also corrects any spacing issues between the blocks and removes any leading or trailing new lines in the file.

The idea would be to have a hook to do this via pre-commit. Thoughts?

@jmreicha jmreicha added the feature New feature or request label Mar 18, 2023
@MaxymVlasov
Copy link
Collaborator

MaxymVlasov commented Mar 22, 2023

Hmm, relates to #446?
And duplicates of #111

@jmreicha If you like to have that hook and it has some unique pluses compared with the suggested in #446 solution - feel free to implement tfsort or 446th hook. In CONTRIBUTING.md you will find things to start from

@MaxymVlasov MaxymVlasov added the estimate/1week Need 1 work week to be done label Mar 22, 2023
@github-actions
Copy link

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 22, 2023
@github-actions
Copy link

github-actions bot commented May 3, 2023

This issue was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate/1week Need 1 work week to be done feature New feature or request stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

2 participants