Skip to content

Latest commit

 

History

History
60 lines (45 loc) · 3.13 KB

README.md

File metadata and controls

60 lines (45 loc) · 3.13 KB

Commands

Getting started with TerraHub CLI is pretty straightforward:

  1. Next, check if npm is installed:
npm --version

The output should look similar to the one below (no need to copy paste):

v5.6.0

NOTE: If npm is missing, check out Downloading and installing Node.js and npm

  1. Install terrahub globally using npm:
npm install --global terrahub

The output should look similar to the one below (no need to copy paste):

~/.nvm/versions/node/v8.10.0/lib
└── terrahub@0.0.1
  1. Test if terrahub cli was installed properly:
terrahub --help

NOTE: TerraHub CLI doesn't magically collect your data and upload to TerraHub API, which is further visualized in TerraHub Console. In order to do that, please sign up for a free account at console.terrahub.io and navigate to Settings page to copy TerraHub Token. Next, setup TerraHub Token as TERRAHUB_TOKEN environmental variable or update token value in global config file - $HOME/.terrahub/.terrahub.json.

When running terrahub --help, you will get a list of commands, summarized below:

Command Description Status
# terrahub management
project create new or define existing folder as project that manages terraform configuration ✔️
component create new or include existing terraform configuration into current terrahub project ✔️
configure add, change or remove config parameters from terrahub config files ✔️
graph show dependencies graph for terraform configuration mapped as terrahub components ✔️
# terraform execution
apply run terraform apply across multiple terrahub components ✔️
destroy run terraform destroy across multiple terrahub components ✔️
init run terraform init across multiple terrahub components ✔️
output run terraform output across multiple terrahub components ✔️
plan run terraform plan across multiple terrahub components ✔️
refresh run terraform refresh across multiple terrahub components ✔️
workspace run terraform workspace across multiple terrahub components ✔️
# cloud automation
build build code used by terraform configuration (e.g. AWS Lambda, Google Functions) ✔️
run execute automated workflow terraform init > workspace > plan > apply ✔️
list list cloud resources by projects > accounts > regions > services > resources ✔️