Improve documentation regarding parameter_store_key
Currently the code defines parameter_store_key to be used in IAM's Encrypted keys.
var (
// KeyID is the alias for the KMS key used to encrypt/decrypt secrets
KeyID = "alias/parameter_store_key"
)
However this key doesn't exist by default and it isn't mentioned in the chamber documentation. You get the below error when trying to write secrets without it.
$ aws-vault exec development -- chamber write test Test "such test"
InvalidKeyId: Alias arn:aws:kms:eu-west-2:xxxx:alias/parameter_store_key is not found. (Service: AWSKMS; Status Code: 400; Error Code: NotFoundException; Request ID: xxxx)
status code: 400, request id: xxxx
This threw me for a little spin because I wasn't sure if the issue lay elsewhere (i.e. aws-vault) or with chamber. I'm happy to make a pull request with an updated README if that's alright?
As an aside, maybe this is something that users should be able to specify incase they wanted to use a different key?
That's a pretty good point @iJebus. Any ideas how we can improve it @dfuentes?
I feel like there might be an opportunity to make the alias configurable, but can't think of a way to do it sanely. Either way, we definitely need to document better
Ran into this as well. Was pretty simple to setup though.
Added some docs around this (and an alias override) in https://github.com/segmentio/chamber/pull/19