# serverless-terraform-outputs

> Serverless plugin for resolving variables from Terraform outputs

Latest version **0.0.4** (published 2019-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install serverless-terraform-outputs
pnpm add serverless-terraform-outputs
yarn add serverless-terraform-outputs
bun add serverless-terraform-outputs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2019-02-28 |
| First published | 2019-01-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | Greg Zapp |
| Maintainers | protip |
| Keywords | serverless, serverless applications, terraform |

## Links

- npm: https://www.npmjs.com/package/serverless-terraform-outputs
- Repository: https://github.com/rundeck/serverless-terraform-outputs
- Homepage: https://github.com/rundeck/serverless-terraform-outputs#readme
- Issues: https://github.com/rundeck/serverless-terraform-outputs/issues
- npm.io page: https://npm.io/package/serverless-terraform-outputs

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2019-02-28
- 0.0.3 — 2019-02-07
- 0.0.2 — 2019-01-04
- 0.0.1 — 2019-01-04

## README

serverless-terraform-outputs
============================

Provides variable substitution resolution from Terraform outputs with workspace support:
```
${terraform:app-stage:sqs_queue_stuff.value.arn}
```
# Usage
```yaml
custom:
    stage: ${opt:stage, self:provider.stage}
    tf_workspace: ${self:custom.stage}

provider:
    environment:
        SQS_QUEUE: ${terraform:${self:custom.tf_workspace}:sqs_queue_stuff.value.url}
```

## Prerequisites
Requires Terraform to be installed and accessible via the path, as well as minimal backend config:
`main.tf`:
```
terraform {
    required_version = "0.11.8"
    backend "s3" {
        region               = "us-west-2"
        key                  = "project/foo"
        bucket               = "foosoft-terraform"
    }
}
```

For outputs from multiple Terraform configurations it is recommended to set them up as data sources
and re-export the required vars.

## Configuration

Optionally, you can configure the plugin:

```
custom:
    terraformOutputs:
        cwd: dir/with/terraform/files
```

| Parameter Name | Default Value | Description |
| --- | --- | --- |
| cwd | _(project base dir)_ | The directory where `terraform outputs` will be executed in, relative to the project base directory |

---
_Source: https://npm.io/package/serverless-terraform-outputs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
