serverless-output-to-env

1.0.2 • Public • Published

serverless-output-to-env

A Serverless plugin that writes stack outputs to a .env file during after:deploy hook.

How to use?

Add the plugin to your serverless.yml

plugins:
  -serverless-output-to-env

Add plugin configuration to serverless.yml

custom:
  outputToEnv:
    fileName: ../../.env
    map:
      YOUR_ENV_KEY: YourOutput
resources:
  Outputs:
    YourOutput:
      Value:
        !Ref FooBar

How to run

It will run automatically in after:deploy hook or you can run it manually with:

serverless output-to-env

Parameters

Name Required Data Type Default Description
fileName Y String Path to output file
map Y Object Key/Value map for .env file key to your output key.

Dependencies (4)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i serverless-output-to-env

    Weekly Downloads

    50

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    6.76 kB

    Total Files

    4

    Last publish

    Collaborators

    • williamsando