Open jmnavarrol opened 1 year ago
I agree that this is the best solution - There is already a way to specify required version within standard terraform and we should use it if practical. Some care will need to be taken to implement the flexible version syntax used in required_version as that will be required for this implementation to work as expected.
Hi!
First of all, thanks for this nice utility (I use it within my Bash Magic Enviro project).
I want to ask for the default in case of new use to slightly change: given that default for TFENV_AUTO_INSTALL is true (which sounds sensible) and that Terraform has its own well-known way to state the required version, I think tfenv should honor it.
Desired outcome:
tfenv install latest-allowed
) if no compatible version already installed, or the topmost valid already installed, if any.Note that the above neglects the need for a .terraform_version file, which should be ditched or, at most, left for backwards compatibility reasons but with discouraged usage (this is a case of "less is more", I think).