TerraHub Commands
Getting started with TerraHub CLI is pretty straightforward:
- 1.Next, check if
npm
is installed:npm --versionThe output should look similar to the one below (no need to copy paste):v5.6.0 - 2.Install
terrahub
globally usingnpm
:npm install --global terrahubThe output should look similar to the one below (no need to copy paste):~/.nvm/versions/node/v8.10.0/lib - 3.Test if
terrahub
cli was installed properly:terrahub --helpNOTE: 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 asTHUB_TOKEN
environmental variable or updatetoken
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 | |
create new or define existing folder as project that manages terraform configuration | :heavy_check_mark: | |
create new or include existing terraform configuration into current terrahub project | :heavy_check_mark: | |
add, change or remove config parameters from terrahub config files | :heavy_check_mark: | |
show dependencies graph for terraform configuration mapped as terrahub components | :heavy_check_mark: | |
| # terraform execution | |
run terraform apply across multiple terrahub components | :heavy_check_mark: | |
run terraform destroy across multiple terrahub components | :heavy_check_mark: | |
run terraform init across multiple terrahub components | :heavy_check_mark: | |
run terraform output across multiple terrahub components | :heavy_check_mark: | |
run terraform plan across multiple terrahub components | :heavy_check_mark: | |
run terraform refresh across multiple terrahub components | :heavy_check_mark: | |
run terraform workspace across multiple terrahub components | :heavy_check_mark: | |
| # cloud automation | |
build code used by terraform configuration (e.g. AWS Lambda, Google Functions) | :heavy_check_mark: | |
execute automated workflow terraform init > workspace > plan > apply | :heavy_check_mark: | |
list cloud resources by projects > accounts > regions > services > resources | :heavy_check_mark: |
Last modified 4yr ago