asdf-hashicorp
asdf-hashicorp copied to clipboard
Useless message: "FATAL: Found legacy version file 'main.tf' with unsupported required version constraint expression"
I appreciate that the plugin tries to determine the version to run based on the terraform code, but if it's not going to parse constraints that are valid to TF, that's no help.
It only displays the message when I don't have a "local" or "shell" version configured via asdf itself, but I do have one selected globally. And it's clearly not a "FATAL" condition, since it proceeds to run that version after printing the message out.
Would rather just get rid of the message.
You can suppress it by changing the configuration file as follows.
~/.asdfrc
legacy_version_file = no
Unfortunately I have that setting enabled to work with https://github.com/asdf-vm/asdf-nodejs
Would it be possible to create a way to disable that message? If I deployed this across my teams, it would cause some support calls from confused developers.
An alternative is to use rtx with a configuration file that looks like this
# ~/.config/rtx/config.toml
[settings]
legacy_version_file_disable_tools = ["terraform"]
to selectively disable this for Terraform.