Using tfenv 0.6.0. I installed tfenv using brew install tfenv
.
I have this in my .terraform-version
terraform {
required_version = ">= 0.10.0, <0.12.3"
}
✗ tfenv install
tfenv: tfenv-install: [ERROR] No versions matching '' found in remote
✗ cat /usr/local/Cellar/tfenv/0.6.0/libexec/tfenv-version-file
✗ find_local_version_file() {
local root="${1}"
while ! [[ "${root}" =~ ^//[^/]*$ ]]; do
if [ -e "${root}/.terraform-version" ]; then
echo "${root}/.terraform-version"
return 0
fi
[ -n "${root}" ] || break
root="${root%/*}"
done
return 1
}
✗ find_local_version_file
✗find_local_version_file .
./.terraform-version
I believe the issue is with the path sent to find_local_version_file
.
Hello @nitrocode,
I was also confused by the docs.
The terraform {...}
code you have is read by Terraform, but not by tfenv
.
Instead in your .terraform-version
, you need a version # or a variation on that. For example:
0.9.11
or
latest:^0.11
HTH!
I don't understand the README section regarding this, it's very misleading and seems very wrong. @kjhosein is correct. Note that this is nothing to do with Mac OS
Proposed improvements to the documentation?
This did help. I replaced my .terraform-version
contents with simply
0.11.14
Most helpful comment
I don't understand the README section regarding this, it's very misleading and seems very wrong. @kjhosein is correct. Note that this is nothing to do with Mac OS