pecigonzalo / autotfenv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AutoTFEnv

Helper tool to be used with tfenv, adds terraform version autoloading functionality on ZSH.

How it works?

When you enter a directory containing .tf files, it will detect if there is a explicit version set, and load prompt you to load it.

Installation

Install python helper using pip or pipsi

 pipenv install -e git+git@github.com:pecigonzalo/autotfenv.git

Now you can run autotfenv on any folder to check if the current tfenv version if the same as the one declared on the .tf files.

I have included a ZSH autoloader helper (bin/autload.zsh), that you can use to automatically check on folder change if there are .tf files, and if there are, trigger autotfenv.

To install it, simply source the file directly or using any ZSH framework.

EG:

zplug "github.com:pecigonzalo/autotfenv", use:"bin/autoload.zsh"

Development

About


Languages

Language:Python 78.9%Language:HCL 14.9%Language:Shell 6.2%