Git Product home page Git Product logo

flora's Introduction

flora

Build Status

Version/upgrade manager for terraform

What is it

Flora is another and missing upgrade and version manager for Terraform. Inspired by tfenv and written in go. You can use it to upgrade your Terraform version by one command. Another use case: to switch between Terraform versions to use compatible with your .tf manifests Terraform binary.

Features

  • Upgrade your Terraform by one command
  • Switch between Terraform versions easy, fast and without pain
  • Bash/Zsh autocompletion. Even for versions.

Install

  1. By brew install
brew install ketchoop/homebrew-tap/flora

mkdir -p ~/.flora/.bin
  1. By go get
go get -u github.com/ketchoop/flora/cmd/flora

mkdir -p ~/.flora/.bin
  1. By install.sh
curl https://raw.githubusercontent.com/ketchoop/flora/master/install.sh | bash

All of installation ways require existing of ~/.flora/bin directory and path to it in your PATH. So...

Add to PATH:

echo 'export PATH=$PATH:$HOME/.flora/bin' >> .path_to_your_rc_file # .bashrc, .zshrc and so on

source .path_to_your_rc_file # To update state of PATH env

Usage(short description)

NAME:
   flora - Simple app to upgrade your terraform

USAGE:
   flora [global options] command [command options] [arguments...]

VERSION:
   0.1.0

COMMANDS:
     upgrade   Upgrade terraform
     download  Download specific Terraform version
     use       Download(when it's needed) and use specific terraform version
     versions  List all available terraform versions
     help, h   Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h     show help
   --version, -v  print the version

How it works

Like rbenv like tools it downloads binary of Terraform and links it to special folder (~/.flora/bin), which path have to be in you PATH env. When you switch between versions flora links another version to bin folder.

flora's People

Contributors

dm3ch avatar ketchoop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flora's Issues

Add shell completion

Should provide not only commands completion(that can be generated by go-cli lib), but versions to install/use.

Refactoring of code

  • Move log.Fatal from upgrader to main module.
  • Use path lib for paths
  • Use more clear naming for upgrader methods and maybe rename upgrader
  • Refactor methods and properties visibility

Automatically handle situations when .flora directory doesn't exists

I've got two errors

  1. This error appeared cause ~/.flora hasn't been existed.
2019/07/08 00:39:13 Downloading Terraform 0.7.0
2019/07/08 00:39:13 open /Users/dmitry.chepurovskiy/.flora/terraform_0.7.0.zip: no such file or directory
exit status 1
  1. This error appeared cause ~/.flora/bin hasn't been existed.
2019/07/08 00:43:59 Adding symlink /Users/dmitry.chepurovskiy/.flora/terraform_0.7.13->/Users/dmitry.chepurovskiy/.flora/bin/terraform
2019/07/08 00:43:59 symlink /Users/dmitry.chepurovskiy/.flora/terraform_0.7.13 /Users/dmitry.chepurovskiy/.flora/bin/terraform: no such file or directory

It would be a good improvement for my opinion if we would create this directories while flora execution.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.