You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know this is an old version of Terraform but it does block using tflocal with the Terraform version I have to use - if there are other issues with older versions of Terraform maybe it's worth documenting a minimum version.
Description
$ tfenv use 1.9.8
Switching default version to v1.9.8
Default version (when not overridden by .terraform-version or TFENV_TERRAFORM_VERSION) is now: 1.9.8
$ tflocal
Usage: terraform [global options] <subcommand> [args]
...
$ tfenv use 0.12.31
Switching default version to v0.12.31
Default version (when not overridden by .terraform-version or TFENV_TERRAFORM_VERSION) is now: 0.12.31
$ tflocal
Unable to determine version. See error message for details: Expecting value: line 1 column 1 (char 0)
It looks like it's because the version is parsed from terraform version -jsonhere, but it doesn't work for v0.12.31:
$ tfenv use 1.9.8
Switching default version to v1.9.8
Default version (when not overridden by .terraform-version or TFENV_TERRAFORM_VERSION) is now: 1.9.8
$ terraform version -json
{
"terraform_version": "1.9.8",
"platform": "darwin_arm64",
"provider_selections": {},
"terraform_outdated": false
}
$ tfenv use 0.12.31
Switching default version to v0.12.31
Default version (when not overridden by .terraform-version or TFENV_TERRAFORM_VERSION) is now: 0.12.31
$ terraform version -json
Terraform v0.12.31
Your version of Terraform is out of date! The latest version
is 1.9.8. You can update by downloading from https://www.terraform.io/downloads.html
The text was updated successfully, but these errors were encountered:
Hi @asharma0703!
Thanks a lot for opening this issue! You correctly identified the source of the issue.
Unfortunately, your version of terraform really is pretty old. But you have already correctly identified the root issue and as far as I can tell it should be fairly simple to integrate that in the version detection.
What do you think, would you be interested in creating a PR and fixing the issue with a contribution from your side?
I know this is an old version of Terraform but it does block using
tflocal
with the Terraform version I have to use - if there are other issues with older versions of Terraform maybe it's worth documenting a minimum version.Description
It looks like it's because the version is parsed from
terraform version -json
here, but it doesn't work forv0.12.31
:The text was updated successfully, but these errors were encountered: