Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
Terraform Cloud Client
node v10.24.1
version:
4.0.0
endpoint
share
tweet
Example use of TerraformCloud library
Initialize terraform cloud client
const { TerraformCloud } = require("terraform-cloud") // Set TERRAFORM_CLOUD_TOKEN in your environment variables const { Account, Runs, Plans } = new TerraformCloud(process.env.TERRAFORM_CLOUD_TOKEN)
// Account const account = await Account.getDetails() console.log(account)
// Request RUN by ID const run = await Runs.show("run-ybWY3ADtDx4YNaph") console.log({run})
// Plans const plan = await Plans.show('plan-LEvswYxGbFycuqv1') console.log({plan})
Loading…
no comments
sign in
to comment