Download Latest Version v3.2.2 source code.tar.gz (80.3 kB)
Email in envelope

Get an email when there's a new version of tfenv

Home / v3.1.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-04-24 2.2 kB
v3.1.0 source code.tar.gz 2026-04-24 43.4 kB
v3.1.0 source code.zip 2026-04-24 71.1 kB
Totals: 3 Items   116.7 kB 0

tfenv v3.1.0

First release since v3.0.0 (July 2022).

New Features

  • latest-allowed version resolution from required_version constraints in Terraform files, supporting =, >=, >, <=, and ~> operators
  • TFENV_SKIP_REMOTE_CHECK to skip checking remote versions before installing
  • Per-version file locking to prevent concurrent install races (#422)
  • Conditional bashlog loading based on shell interactivity via TFENV_BASHLOG (#229)
  • Custom remote compatibility for Artifactory and similar mirrors
  • Dockerfile for containerised usage and end-to-end testing

Bug Fixes

  • Filter pre-release versions from latest resolution; use latest: (with colon) or alphabetic regex to include pre-releases (#375, [#204])
  • CLI argument takes precedence over TFENV_TERRAFORM_VERSION for install (#441)
  • Route tfenv log output to stderr in terraform shim context (#374)
  • Do not assume brew is available for GNU grep detection (#442)
  • Operator precedence bug and unbound variable in version-name resolution (#406, [#431])
  • Shell quoting fixes: trap word-splitting (#455), curl paths with spaces (#454), exec argument iteration (#453)
  • Stray closing paren in syslog tag (#451), dead code removal (#452, [#460])
  • Fix realpath not available on macOS
  • Fix use of -chdir with absolute paths (#354)
  • Handle different line endings in .terraform-version files
  • Windows OS selection with underscore handling for Cygwin-like tools
  • Darwin arm64/amd64 regex workaround fix
  • macOS architecture selection for TFENV_ARCH
  • Replace use of rev for Windows compatibility
  • Fix latest-allowed version matching for partial versions
  • Fix legacy ENV syntax in Dockerfile
  • Various documentation fixes and README improvements

Test Coverage

Complete test coverage overhaul — 13 test suites (7 new), zero failures across Ubuntu and macOS:

  • commands, list-remote, pin, version-file resolution, pre-release filtering, environment variables, resolve-version

Full Changelog

See CHANGELOG.md (github.com) for complete details with contributor attribution.

Source: README.md, updated 2026-04-24