Collection of scripts to ease out some tasks duriing devops pipelines.
npm i devops-scripts
Or Install globally
Recomended way is to install this module globally in your dev or ci/cd environment.
npm i -g devops-scripts
Terraform cloud scripts
TFC_TOKEN
: Terraform cloud Access TokenTFC_WORKSPACE
: Terraform cloud worksapce id. e.g.ws-xxxxxxxxxx
terraform-cloud <command> <sucommand> [arguments]
OR
tfc <command> <sucommand> [arguments]
workspace
-
get
- Prints the provided workspace as outputExample:
$ tfc workspace get orgnization/workspace
-
list
- List all workspaces in Organization.Note: In case of missing organization name, Throws an error and outputs all available organizations in the account.
Example:
$ tfc workspace list Error: Organization Missing Please pass organization from list below: - OrgA - OrgB Terraform Cloud - Devops Scripts Github: https://github.com/phenixcoder/devops-scripts Usage: terraform-cloud <resource> <action> [arguments] OR tfc <resource> <action> [arguments]
OR
$ tfc workspace list orgnization
-
output
get
- Get the first output from latest state and prints as outputlist
- Lista all output in the state.
state
get
- Get the latest state and prints as output