1.0.0 • Published 2 years ago
serverless-doppler-dotenv-secrets v1.0.0
Installation
$ npm install --save-dev serverless-doppler-dotenv-secretsConfiguration
- All doppler configuration parameters are required.
# add in your serverless.yml
plugins:
- serverless-doppler-dotenv-secrets
custom:
doppler:
dopplerToken: ${param:doppler-token, env:DOPPLER_TOKEN, 'UNDEFINED'}
environmentSlug: ${param:environment, 'dev'}
projectName: ${param:project-name, self:service, 'UNDEFINED'}Usage
run the command below before running serverless deploy
sls create-dotenv --param="doppler-token=<your-doppler-token-here>" --param="environment=<your-environment-slug-here>" --param="project-name=<your-project-name-here>"You can export
DOPPLER_TOKENto your session and runsls create-dotenvwithout the--paramflag for the token.
Notes
dopplerTokenis a required parameter and it can be passed as an environment variable or as a parameter in the command line or it will default toUNDEFINEDand the command will error with 401 as return code.environmentSlugis the Doppler project environment slug. It can be passed as a parameter in the command line or it will default todev.projectNameis the Doppler project name. It can be passed as a parameter in the command line or it will default toUNDEFINEDand the command will error with 404 as return code.
1.0.0
2 years ago