You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Imagine the following chamber list-services output:
Service
app/aws
app/bucket
app/secrets
Right now you cannot do chamber export app but need to explicitly provide the service name e.g. chamber export app/aws.
It would be nice if one could export the entire tree, using the service as a prefix.
I haven't been involved in this project previously, but would like to respond. (I'm a Segment employee.)
I reported some analysis and ideas in a related issue and I'll expand on that here.
There are a couple of problems (not insurmountable!) with the suggestion in this issue.
chamber doesn't recurse down a path-like structure for service names anywhere at the moment, as far as I can tell. For example, export could produce AWS_REGION="foo" due to some SSM parameter named "app/aws/region", but chamber exec app or chamber list app won't notice it. Maybe it'd be enough if chamber import similarly interpreted the export output as paths, but ...
When chamber converts parameter names into environment variable names (this is for the dotenv format), it converts characters besides / - notably . - into underscores. At that point, there's no indication whether the underscore is a path separator or not. So, the import process wouldn't know how to construct the original hierarchy. (Maybe we'd accept that as a lossy output format that can't be reliably imported, because other formats preserve the hierarchy.)
I think a --recursive option like I suggested in the other issue could work well here. Also, an alternative that works today is to use dot separators for the chamber keys, so for example:
chamber write app aws.region us-west-2
That leads to a parameter name "app/aws.region", so if there are other processes reading the raw parameter and expecting a nice hierarchy, well, they'd be disappointed. But, it would produce the desired AWS_REGION environment variable name.
Imagine the following
chamber list-services
output:Right now you cannot do
chamber export app
but need to explicitly provide the service name e.g.chamber export app/aws
.It would be nice if one could export the entire tree, using the service as a prefix.
For instance if one had such SSM parameter setup:
chamber export app
could then produce something like:The text was updated successfully, but these errors were encountered: