Skip to the content.

tfflick

https://github.com/ggaacode/tfflick

Description

tfflick is a Powershell Terraform version manager module. tfflick downloads the specific version you require and switches between them.

tfflick is a Powershell alternative for tfswitch Terraform version manager.

Installation is quick and and you can start using Terraform straight away.

Terraform executables are downloaded from https://releases.hashicorp.com/terraform/ using Tls12 protocol

tfflick Currently has been tested on Powershell version 5.1 and currently only downloads the Windows AMD64 versions of the Terraform executable

Download

Installation

Using the installer

Note, you’ll need to check your Powershell execution policy before you can run the installer install_tfflick.ps1 and use tfflick in general.

Run the Installer

Open Poweshell as Administrator and navigate to the extracted tfflick downloaded directory.

To run the installer when the execution policy is set to LocalMachine RemoteSigned, you need to temporarily set it to Process Bypass to be able to install tfflick. This is only valid for the current session of Powershell.

Run Set-ExecutionPolicy Bypass -Scope Process

Run .\install_tfflick.ps1 if you don’t want the module to be unblocked by the installer

Or .\install_tfflick.ps1 unblock-tfflick to unblock the module during installation

Manual installation

Removal

Usage

tfflick

alt text

tfflick {version number}

alt text

tfflick -h or tfflick help

alt text

Git Bash

You can use a limited version of tfflick in Git Bash. It allows to download and change Terraform versions by calling tfflick {version number} or tfflick -h or tfflick help. The scrolling menu is not available in Git Bash

Procedure

In Git Bash, append this code to your ~/.bash_profile file. If the file doesn’t exist, you can create it.

vim ~/.bash_profile

Paste/append this code in .bashrc

function tfflick(){
        if [ -z "$1" ]
        then
                echo "Please pass the desired Terraform version number as an argument"
                echo "Example: tfflick 1.3.5"
                echo "Alternatively use tfflick in a Powershell window"
        else
                powershell -command tfflick "$1"
                echo "tfflick has limited functionality in Git Bash."
                echo "To use the full version of tfflick try it in a Powershell window"
        fi
}

Then run:

source .bash_profile

Release Notes

v0.1.3

v0.1.2

v0.1.1

v0.1.0

Known Issues

Error:

TerminatingError(Invoke-WebRequest): "The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's first-launch configuration is not complete. Specify the UseBasicParsing parameter and try again. "

To-Do