Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cbuschka/tfvm
Terraform Version Manager - Always the right terraform version for your project
https://github.com/cbuschka/tfvm
golang terraform tool version-manager wrapper
Last synced: 2 months ago
JSON representation
Terraform Version Manager - Always the right terraform version for your project
- Host: GitHub
- URL: https://github.com/cbuschka/tfvm
- Owner: cbuschka
- License: apache-2.0
- Created: 2020-04-25T08:54:58.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-11-03T18:29:03.000Z (3 months ago)
- Last Synced: 2024-11-03T19:26:23.291Z (3 months ago)
- Topics: golang, terraform, tool, version-manager, wrapper
- Language: Go
- Homepage:
- Size: 550 KB
- Stars: 18
- Watchers: 3
- Forks: 4
- Open Issues: 11
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# tfvm - Terraform version manager
[![Build](https://github.com/cbuschka/tfvm/workflows/build/badge.svg)](https://github.com/cbuschka/tfvm) [![Latest Release](https://img.shields.io/github/release/cbuschka/tfvm.svg)](https://github.com/cbuschka/tfvm/releases) [![Go Report Card](https://goreportcard.com/badge/github.com/cbuschka/tfvm)](https://goreportcard.com/report/github.com/cbuschka/tfvm) [![License](https://img.shields.io/github/license/cbuschka/tfvm.svg)](https://github.com/cbuschka/tfvm/blob/main/license.txt)### 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](https://github.com/cbuschka/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](https://github.com/cbuschka/tfvm/releases/latest) 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-versiontfvm which
```"latest" and [semver ranges](https://github.com/hashicorp/go-version#version-constraints), 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 terraformterraform version
```### More commands via tfvm usage info
```
tfvm help
```### Environment Variables
[Supported Environment Variables](./doc/env-vars.md)## Development Requirements
* Go 1.22.x, Linux or macOS for development
* GNU make >= 4.3## Similar tools
* [tfenv](https://github.com/tfutils/tfenv) [(comparison)](./doc/tfvm-vs-tfenv-vs-terraform-switcher.md)
* [terraform-switcher](https://github.com/warrensbox/terraform-switcher) [(comparison)](./doc/tfvm-vs-tfenv-vs-terraform-switcher.md)
* [renatoassis01/tfvm](https://github.com/renatoassis01/tfvm)
* [jkehres/tfvm](https://github.com/jkehres/tfvm)
* [terraformw](https://objectpartners.com/2017/12/21/use-a-terraform-wrapper-script-to-easily-manage-terraform-installations/)
* [tfswitch](https://github.com/warrensbox/terraform-switcher)
* [terraform-installer](https://github.com/robertpeteuil/terraform-installer)
* [tfw](https://github.com/stormbeta/tfw)## Contributing
Contributions are welcome!**By contributing you accept to contribute under the [license](./license.txt) of this project.**
* [Fork](https://github.com/cbuschka/tfvm/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](https://contrib.rocks/image?repo=cbuschka/tfvm)](https://github.com/cbuschka/tfvm/graphs/contributors)
## License
Copyright (c) 2020-2021 by [Cornelius Buschka](https://github.com/cbuschka).[Apache License, Version 2.0](./license.txt)
## Thanks!
Special thanks goes to [JetBrains s.r.o.](https://www.jetbrains.com/) for supporting the development of this project with
a free [IntelliJ IDEA Ultimate ![IntelliJ IDEA](./doc/idea.png)](https://www.jetbrains.com/idea/download) license.