Feature Request: chamber load <service> <file>
Not sure if it's something you want to tackle or not, but would load the ability to specify an .env file or just a file with key value pairs.
We have a ton of rails apps that we are converting to use chamber and it would be really nice to just do something like:
chamber load someservice .env or something similar.
Bonus points if it can exclude new lines and comments by default!
More bonus points if I don't have to remove all the equal signs in the file!
I can definitely see this solution becoming a lot more popular with native AWS users, the simplicity is great.
I'd love to jump on this. Still something anyone wants?
This would be helpful but it would be even better to do it in reverse, export to .env. I think it's the same as issue #31
Bonus points if it can exclude new lines and comments by default! More bonus points if I don't have to remove all the equal signs in the file!
Both of these can be solved by importing a yml file instead of an env file. Same for exporting. Whilst this would be a nice addition to chamber itself, it's also pretty easy to crank up in less than 40 lines, together with ordering, uppercasing and putting services into yml sections.
I've just done this
awk '{ if( $1 != "" && substr($1, 0,1) != "#" ) print "chamber write service-name-here " $1 " " $2} ' FS="=" .env
I hope that helps; really hope they can convert it automatically soon!
Wanted to give an update here, with the move to path based defaults in 2.0 (https://github.com/segmentio/chamber/pull/80), I've also added a chamber import function that may help with these kinds of uses. Right now, import only supports json import, but there is no reason we couldn't support more formats like chamber export does in the future.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'd argue this is done, with chamber import.