serverless-consul-variables

This Serverless plugin allows you to populate environment variables from a Consul server. This is done at build time.
Documentation
Installation
First install the plugin using npm or yarn
npm install serverless-consul-variables --save-dev
yarn install -D serverless-consul-variables
Then inside of your project's serverless.yml
file add the following to the plugins section. You should change the consul host & port to match your build environment.
custom:
serverless-consul-variables:
host: 127.0.0.1
port: 8500
plugins:
- serverless-consul-variables
To reference a consul variable, you must prefix it with ${consul:}. For example:
environment:
SOME_VARIABLE: ${consul:path/to/kv/variable}
Contributing
Pull requests are always welcome. Please see the contributing guidelines.
License
MIT