terraform-js
A Javascript wrapper for terraform CLI.
Supports all commands with the exception of terraform console
.
Installation
npm install terraform-js
Usage
See the generated API Docs for detailed documentation.
Using the Terraform Class
tf.workspaceList.thenconsole.log // workspace1// * workspace2// workspace3
Functional Style
// execute a single commandexecWorkspaceNew"test-2", cfg.thenconsole.log //> * default // execute multiple commands mapExeccommands, cfg.thenresults.forEachconsole.log // logs output of each command