trek10inc / serverless-secrets

An opinionated tool for safely managing and deploying Serverless projects and their secrets.
Other
165 stars 27 forks source link

Decryptor registered too early #8

Closed colinfindlay-nz closed 8 years ago

colinfindlay-nz commented 8 years ago

Hi,

I am trying to use Serverless Secrets with a region other than us-east-1 (We're not allow to hold sensitive data in the US), however we noticed it just wouldn't work! Further analysis shows that the generated _serverless_handler.js that gets deployed instantiates the decryptors before the envVars are set - so CREDSTASH_REGION is alway us-east-1

Generated code...

'use strict';

var decryptor = require('./serverless-secrets/decryptor');

var envVars = {"SERVERLESS_PROJECT":"....etc

:sob:

shortjared commented 8 years ago

Merged into master. Have not cut a new release yet though.

colinfindlay-nz commented 8 years ago

Do it. You know you want to... 😀

shortjared commented 8 years ago

It's on my todo. Shouldn't take long.