Serverless Output To Env

homepage icon https://github.com/williamsandonz/serverless-output-to-env
Follow @williamsandonz

Tracked

NPM Downloads Last Month
32
Issues
0
Stars
0
Forks
0
Watchers
0
Watch Star Fork Issue Download License NPM Build Status Coverage Status Contributors

Repo README Contents:

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.