Skip to content
/ tfvm Public

Terraform Version Manager - Always the right terraform version for your project

License

Notifications You must be signed in to change notification settings

cbuschka/tfvm

Repository files navigation

tfvm - Terraform version manager

Build Latest Release Go Report Card License

Always the right terraform version for your project

Features

  • fully transparent
  • downloads and installs terraform version
  • select terraform version via .terraform-version
  • invoke selected terraform through tfvm
  • also available as github action setup-tfvm (fully transparent terraform setup)

System Requirements

  • Linux (386, amd64, arm64), macOS (amd64, arm64) or Windows (386, amd64)

Installation

as root in /usr/local/bin

curl -sL https://raw.githubusercontent.com/cbuschka/tfvm/main/install.sh -o - | sudo bash

as unpriviledged user in ${HOME}/.local/bin if available, else ${HOME}/bin as a fallback

curl -sL https://raw.githubusercontent.com/cbuschka/tfvm/main/install.sh -o - | bash

manual installation

  • Download tfvm from latest release to your bin dir
  • Make executable chmod o+x tfvm
  • Optionally link to tfvm as terraform ln -s tfvm terraform

Usage

Show which terraform version would be executed

tfvm which

List terraform versions

tfvm list

Configure terraform version

echo "1.3.7" > .terraform-version

tfvm which

"latest" and semver ranges, e.g. >= 1.3.0, <1.4.0, are also supported.

Invoke selected terraform

tfvm terraform version

Tip: Call selected terraform directly

ln -s tfvm terraform

terraform version

More commands via tfvm usage info

tfvm help

Environment Variables

Supported Environment Variables

Development Requirements

  • Go 1.22.x, Linux or macOS for development
  • GNU make >= 4.3

Similar tools

Contributing

Contributions are welcome!

By contributing you accept to contribute under the license of this project.

  • Fork and clone the repository
  • Create a feature branch (git checkout -b foobar)
  • Commit your changes (git commit -am 'Add feature foobar')
  • Make sure the project builds and all tests are passing
  • Push to the branch (git push origin foobar)
  • Create a new pull request and describe what you want to achieve or fix

Contributors

Contributors

License

Copyright (c) 2020-2021 by Cornelius Buschka.

Apache License, Version 2.0

Thanks!

Special thanks goes to JetBrains s.r.o. for supporting the development of this project with a free IntelliJ IDEA Ultimate IntelliJ IDEA license.

About

Terraform Version Manager - Always the right terraform version for your project

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages