Skip to content
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

feature suggestion heroku:get #239

Open
scarroll32 opened this issue Jun 1, 2016 · 1 comment
Open

feature suggestion heroku:get #239

scarroll32 opened this issue Jun 1, 2016 · 1 comment

Comments

@scarroll32
Copy link

It would be nice to be able to pull a configuration manually entered into Heroku back to the workstation. This should be possible via the Heroku Platform API.

Please let me know what you think about this ... I will have a go at coding it.

@TheNotary
Copy link

TheNotary commented Aug 23, 2016

The heroku toolbet gem can get env vars with heroku config:get I think. Since that work has already been done, I think a best approach to this problem is to create a figaro:env_to_yml command that takes in (perhaps from STDIN) a string of env variables and outputs an appliaction.yml file. This saves us the step of having to conver = signs to : signs and such. Ultimately the workflow would become:

my_app $  heroku config -s | figaro config:env_to_yml > heroku_application.yml

The reason I think to do it this way using pipes and such is that there are getting to be many PaaS code bases out there and Figaro should probably try to be as agnostic and multi-purposed as possible.

What do you think, and did you make any progress? I'm thinking I might make a figaro-config-addons gem to add this functionality to figaro faster to allow time for review, discussion and bug fixing.

It's important that we have a backwards and forwards compatible way (a way to set configs). As it stands, figaro heroku:set automatically slurps up the application.yml file, converting it to an env format (without new line characters) and then sets the variables in heroku using herokutoolbelt CLI app (an explicit dependency). Since Heroku is popular, this method is arguably helpful, but it isn't useful when the developer needs to import vars into dokku, Deis, etc, etc. To this developer, an additional command figaro config:yml_to_env would be helpful. I'll rewrite my PR... add tests... then see about pulling it into it's own figaro-config-addons gem and put it up for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants