Skip to content

turmantis/terawatt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terawatt

A simple, configuration free, version manager for terraform.

Install

go install github.com/turmantis/terawatt@latest

Example

Terawatt is a simple wrapper around terraform. All args are passed through to terraform.

$ echo 'terraform {required_version = "~> 1.2.3"}' > foo.tf
$ terawatt plan
Downloading: https://releases.hashicorp.com/terraform/1.2.3/terraform_1.2.3_linux_amd64.zip

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.

Version Resolution

  1. Check if .terraform-version exists. If it does, stop and use that version.
  2. Scan all files ending in .tf and looking required_version statement. If it exists, use that version.
  3. Fetch the available versions of terraform and use the latest stable version.

Uninstall

Terawatt saves state in two separate places. The version list and zip bundles are saved in a temporary subdirectory called .terawatt. It also stores the different versions of Terraform under the users home directory in a directory called .terawatt.

rm -rf "$HOME/.terawatt"
rm -rf "/tmp/.terawatt"

The only thing remaining is terawatt itself.

rm $(which terawatt)

About

A simple, configuration free, version manager for terraform.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages