AlexNabokikh / tfsort

A CLI utility to sort Terraform variables and outputs
Apache License 2.0
138 stars 5 forks source link

Sort variables based on the order in the code files #35

Open sfenman opened 1 year ago

sfenman commented 1 year ago

Hello,

Thanks for this tool, it really helps. What I would like to see as a feature is to be able to sort variables based on the order they are found in the code files eg. in the main.tf. There are sometimes where I want to "group" variables based on the resource type.

For example let's assume that I have an AWS S3 module. I might have a logical block inside main.tf that defines all IAM resources before the actual AWS S3 resource. Sorting variables in this order enhances navigation in the variables.tf file especially when you have multiple types of Terraform resources.

I understand this is a huge and time consuming implementation but if you think there is a fit in this project, I could help with that.

AlexNabokikh commented 1 year ago

@sfenman I appreciate your idea and recognize the effort it would take to bring it to fruition. However, given my current workload, I must prioritize my primary responsibilities. If you have the opportunity and inclination to work on this initiative, I encourage you to do so, and I am open to any possible contributions you may have.