terraform-remote-state
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

Terraform Remote State

Micro library to fetch terraform state (right now only from S3 bucket)

Installing

Node.js (JavaScript/TypeScript)

To use from JavaScript or TypeScript in Node.js, install using either npm:

$ npm install terraform-remote-state

or yarn:

$ yarn add terraform-remote-state

Examples

The following program will read a Terraform state file stored in S3 from staging workspace:

const tf = require('terraform-remote-state')

const state = await tf.s3RemoteState("staging", {
    bucket: "pulumi-terraform-state-test",
    key: "test/terraform.tfstate",
    region: "us-west-2",
    profile: 'terraform-state'
});

const restApiId = state.getOutput("restapi_id");

Readme

Keywords

Package Sidebar

Install

npm i terraform-remote-state

Weekly Downloads

0

Version

1.0.6

License

WTFPL

Unpacked Size

7.79 kB

Total Files

14

Last publish

Collaborators

  • bordeux