0.0.3 • Published 5 years ago

@zrpaplicacoes/ssm-parameter-validation v0.0.3

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

SSM Parameter Validation

SSM Parameter Validation is a package that validate if all the variables listed in docker-compose are configured in SSM (System Manager in AWS) as environment variables.

This works for projects that locally are docker based (and uses docker compose) and in production uses SSM as environment parameters control.

How to use

In your machine

Install the package in your dev-dependencies:

npm install @zrpaplicacoes/ssm-parameter-validation --save-dev

And then import the file in your code to use:

const { ssmValidation } = require('./index.js');

ssmValidation(config);

You can both configure your project variables through config file or environment variables.

Using docker

Docker only supports configuration through environment variables, so run:

docker run -v /${PWD}/docker-compose.yml:/home/node/app/docker-compose.yml -e AWS_REGION='<<region>>' -e AWS_SECRET_ACCESS_KEY='<<config>>' -e AWS_ACCESS_KEY_ID='<<config>>' -e PARAMETERS_PATH='<<config>>' -e IGNORE_PARAMETERS='<<config>> ssm-parameter-validation'

Configuration

Through Config File

Through Environment Variables