tfvm

module
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2022 License: Apache-2.0

README

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 "0.12.8" > .terraform-version

tfvm which

"latest" and semver ranges, e.g. >= 0.12.1, <0.12.10, 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.18.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.

Directories

Path Synopsis
cmd
internal
cli
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL