-
-
Notifications
You must be signed in to change notification settings - Fork 540
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
Feature: Sort Variables #111
Comments
Hi @sblack4 Feel free to ask any questions - it also helps me write a better contribution doc (#216) |
If someone has a will to implement this feature request as a Quoting here for convenience:
|
@yermulnik Nice solution! We have just removed I am not sure we really need to bring such a solution here because it will require maintenance (new arguments, new blocks can be added in |
JFYI: I've just extended the script to handle also some other general types of TF resources (not only
100% agree. The only reason I created this
Yep, I agree for 100%. And this is why I haven't gone with a hook but with a helper script as I personally never needed this. Hope feature requester would be interested to get it done if this is worth of implementation for any occasional use case. |
Hopefully this should work w/o issues for any general-purpose TF resource blocks despite adding new arguments or nested blocks to them. |
This issue has been automatically marked as stale because it has been open 30 days |
This issue was automatically closed because of stale in 10 days |
My friends and I have been trying to standardize our terraform modules. One of the things we've started to do is sorting everything, particularly variables, alphabetically. I think this would make a great pre-commit hook.
There's a feature request out there for it hashicorp/terraform#12959 and I've got a script to do this I stole from that thread. I've never written my own pre-commit hook but I'd love to take on something simple like this to get a better idea of how the pre-commit hooks work
The text was updated successfully, but these errors were encountered: