-
Notifications
You must be signed in to change notification settings - Fork 912
Description
Is your feature request related to a problem? Please describe
Sometimes I am running Terraform or OpenTofu in automation and want the user to be able to specify the version of Terraform or OpenTofu that they are using for this specific directory. I do not want to have to dictate or pre-install all possible versions into that environment.
Describe the proposed solution
I think this should be a configuration setting like ASDF_AUTO_INSTALL that works similarly to TENV_AUTO_INSTALL. This flag could be set as an environment variable or in ~/.asdfrc.
Describe similar asdf features and why they are not sufficient
The current workflow causes an error if the version of the tool is not already installed and requires manual intervention to run the install command for that version. This is not viable in automation.
Describe other workarounds you've considered
We have to use tenv which supports this capability instead of asdf so we have tooling sprawl and inconsistency when we would much prefer to just use asdf consistently in both automation and local development. This also forces us to use the legacy_version_file option instead of putting our Terraform or OpenTofu versions in .tool-versions, which has negative impacts on the consistency, maintainability, and how centralized our tool version management is.
We could potentially write our own custom tooling for the automation environment to detect and install the version dynamically, but that defeats the whole point of using asdf.
Prior related issues that are no longer open: