@pnjha/terraform-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.23 • Public • Published

terraform-js

A lightweight Javascript wrapper library for Terraform Cli written in Typescript

NPM package link: https://www.npmjs.com/package/@pnjha/terraform-js

Install the package:

npm i @pnjha/terraform-js

Example:

import { Terraformer } from "@pnjha/terraform-js";

const config = {
  logLevel: 'INFO',         // supported values: TRACE, DEBUG, INFO, WARN or ERROR. Default is INFO
  workspace: 'default',     // workspace name if you want to create a new workspace. Default workspace is 'default'
  pluginDirectory: null,    // directory where you want to install terraform provider plugin
  templateDirectory: '.',   // directory where terraform templates are present
  workingDirectory: '.'     // directory where tf state file will be generated
}

const tf = new Terraformer(config);

tf.apply().then().catch((err)=>{
  console.log(err);
});

All contributions to this repo are welcomed in form of issues and PRs

Package Sidebar

Install

npm i @pnjha/terraform-js

Weekly Downloads

1

Version

0.0.23

License

ISC

Unpacked Size

20.5 kB

Total Files

5

Last publish

Collaborators

  • terraform-js