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

Per-stage environment variables in up.json #792

Open
tj opened this issue Nov 8, 2019 · 1 comment
Open

Per-stage environment variables in up.json #792

tj opened this issue Nov 8, 2019 · 1 comment

Comments

@tj
Copy link
Member

tj commented Nov 8, 2019

Currently you can't define these per-stage, only with up env .... Ideally you can define them in the stage, and at the root level and they merge.

I'm not sure if precedence should be given to up env's, or the up.json but probably the up.json would be the most clear?

@Prinzhorn
Copy link

After #785 I just wanted to ask for exactly this :D

Regarding precedence: I personally assume everything under stages to be merged into the top level up.json depending on the stage. Essentially

Object.assignRecursively(finalJson, upJson, stageSpecificJson)

What I'm trying to say is that adding support for stage specific environment variables shouldn't affect precedence at all and is not a question that needs to be asked. I assume there currently already is a precedence implemented (I haven't used up env) which would just stay exactly as is. Otherwise you'd weirdly interleave up env and up.json.

So what we don't want is a precedence like this

  1. Stage specific in up.json
  2. up env
  3. Global up.json

That would be weird.

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

No branches or pull requests

2 participants