@zrpaplicacoes/ssm-parameter-validation
v0.0.3
Published
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.
Downloads
7
Keywords
Readme
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'