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

Support optional secrets #359

Open
Zeko369 opened this issue Jun 27, 2023 · 1 comment · May be fixed by #360
Open

Support optional secrets #359

Zeko369 opened this issue Jun 27, 2023 · 1 comment · May be fixed by #360

Comments

@Zeko369
Copy link

Zeko369 commented Jun 27, 2023

(Continuation of #346)

My idea was to somehow override them in the destination files but since they're merged there needs to be a "way" of allowing optional ENVs (without having to do [empty] and then check in the app)

My idea of how this should work

# deploy.yml
env:
  secret:
    - APP_NAME
    - RETURN_URL?

Cases

  1. APP_NAME missing -> errors
  2. RETURN_URL present -> loaded
  3. RETURN_URL missing -> ignored (so using ENV['RETURN_URL'] in container would return nil)
@Zeko369
Copy link
Author

Zeko369 commented Jun 27, 2023

Also another question, how would we handle merging of the ENVs between destinations?

Opt 1 (the simplest) -> the Draft PR currently implements this

if we find FOO and FOO?, we just keep the FOO?

Opt 2:

Allow the destination to specify the "final"

  1. deploy: FOO, deploy.stage: FOO? -> FOO?
  2. deploy: FOO, deploy.stage: FOO -> FOO
  3. deploy: FOO?, deploy.stage: FOO -> FOO
  4. deploy: FOO?, deploy.stage: FOO? -> FOO?

The only thing we lose in this case is that we might want to "require an ENV on the top level" and this would override it

@Zeko369 Zeko369 linked a pull request Jun 27, 2023 that will close this issue
2 tasks
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

Successfully merging a pull request may close this issue.

1 participant