-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat: add env vars import at application creation #652
base: master
Are you sure you want to change the base?
Conversation
Should we really do that? This means that |
When a user creates an application or deploy an existing project needing env vars, he should create the app and then import env vars. As we can now do both in 1 step from API, it could be great to have such a feature directly from Config provider is a Clever Cloud centric way to share env vars with an app, I'm not sure it covers the same needs. |
I get the aim, I think that a lot of env vars could be shared to an app with a Config Provider enabling already a 1 click order for most tutorials. However indeed it could be great to be able to add env variables directly when we order a new application. First I would see something like: clever create --set-env='key=value'
clever create --set-env='key=value' --set-env='key42=value42' And from here I am not sure that we should loaded it from a file, maybe it could something like (we should discuss it I think) : clever create --set-env-from='.env'
clever create --set-env-from='.env.json' |
I'm not opposed to a BTW, |
🔎 A preview has been automatically published:
This preview will be deleted once this PR is closed. |
Thanks for your feedback on this, the more I think of if, the less I am convinced. I am afraid that this would enforce a sort of bad practice (having a local env file), that could easily lead to leaking secrets. I am more in favour to add env vars threw the CLI with |
Fix #651
This PR adds a
--env
/-e
option to import env vars from a file duringclever create
.If no file name is declared, it uses
.env
by default.