Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tfversion/tfversion
A simple tool to manage Terraform versions
https://github.com/tfversion/tfversion
cobra go hashicorp installer terraform version-manager
Last synced: about 1 month ago
JSON representation
A simple tool to manage Terraform versions
- Host: GitHub
- URL: https://github.com/tfversion/tfversion
- Owner: tfversion
- License: mpl-2.0
- Created: 2024-02-11T10:44:53.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-12-19T19:14:05.000Z (about 1 month ago)
- Last Synced: 2024-12-19T20:20:58.430Z (about 1 month ago)
- Topics: cobra, go, hashicorp, installer, terraform, version-manager
- Language: Go
- Homepage: https://tfversion.xyz
- Size: 10.9 MB
- Stars: 17
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tfversion
[![Release](https://github.com/tfversion/tfversion/actions/workflows/goreleaser.yaml/badge.svg)](https://github.com/tfversion/tfversion/actions/workflows/goreleaser.yaml) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/tfversion/tfversion) [![Go Reference](https://pkg.go.dev/badge/github.com/tfversion/tfversion.svg)](https://pkg.go.dev/github.com/tfversion/tfversion)
A simple tool to manage Terraform versions.
## Brew
To install tfversion using brew, simply run:
```sh
brew install tfversion/tap/tfversion
```## Binaries
You can download the [latest binary](https://github.com/tfversion/tfversion/releases/latest) for Linux, MacOS, and Windows.
## Configuring your shell
To ensure that `tfversion` is always available in your shell, append the following line to your shell profile (e.g., .bashrc, .zshrc or fish config):
```sh
export PATH="$HOME/.tfversion/bin:$PATH"
```We prefer to not automagically modify your shell profile, and therefore leave this step to you.
## Examples
`tfversion` is user-friendly and easy to use. For more information, please visit the [documentation](https://tfversion.xyz/use.html).
### Install a specific version
```sh
tfversion install 1.7.0
```### Install the latest stable version
```sh
tfversion install --latest
```### Install the latest pre-release version
```sh
tfversion install --latest --pre-release
```### Install the required version for your current directory
```sh
tfversion install --required
```### Use a specific version
```sh
tfversion use 1.7.0
```### Use the latest stable version
```sh
tfversion use --latest
```### Use the latest pre-release version
```sh
tfversion use --latest --pre-release
```### Use the required version for your current directory
```sh
tfversion use --required
```### Automatically install a version when using
```sh
tfversion use 1.7.4 --install
tfversion use --latest --install
```### Create and use an alias
```sh
tfversion alias default 1.7.4
tfversion use default
```### List versions
```sh
tfversion list
```### List installed versions
```sh
tfversion list --installed
```### List aliased versions
```sh
tfversion list --aliases
```### List pre-release versions
```sh
tfversion list --pre-release
```### Uninstall a specific version
```sh
tfversion uninstall 1.7.4
```### Display the currently activated version of Terraform
```sh
tfversion current
```## Contributing
Contributions are highly appreciated and always welcome.
Have a look through existing [Issues](https://github.com/tfversion/tfversion/issues) and [Pull Requests](https://github.com/tfversion/tfversion/pulls) that you could help with.