-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for specifying secrets using a list of strings. #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Let's just iterate on the README.md a bit. I'm happy to take a stab too if you agree with the comment there
README.md
Outdated
environmentSecrets: | ||
MY_SECRET: MY_SECRET | ||
``` | ||
|
||
The plugin will create a json file with all the secrets. In the above example the ciphertext and ARN of the secret located at `path/to/ssm/secret` will be stored in the file under the key `MYSECRET`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph references path/to/ssm/secret
which doesn't match up with the last example.
What do you all think of having a basic getting started that just uses the 'simple' way, and then create a new Advanced Configuration
section that details how to customize the key name. This we we lower the barrier to adoption w/ as little upfront customization as possible, but then provide opportunities for 'advanced' config for power users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thought.
Co-Authored-By: Danny Varner <[email protected]>
I think we should actually run a functional test too. |
Okay, I did some testing on the solution. We also updated the examples to use the list and explicit object syntax. Please review again @piohhmy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks great! The ability to mix and match is 👌
@piohhmy Did you run manual tests on the different ways to specify secrets? If not one of us probably should just so there's a second test beyond the original developer environment. |
Issue
#1
What
You can now specify only the ssm name for secrets as a list in the serverless.yml file
is equivalent to
Test
See the example above. You should be able to create a secret in parameter store with a simple name like 'MY_SECRET', reference it in serverless.yml using the name 'MY_SECRET' in a list, and then reference it in your lambda using the name 'MY_SECRET'.