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

Add support for secrets in v2 #1079

Merged
merged 9 commits into from
Apr 29, 2022
Merged

Add support for secrets in v2 #1079

merged 9 commits into from
Apr 29, 2022

Conversation

taeold
Copy link
Contributor

@taeold taeold commented Apr 16, 2022

In addition to adding secrets to v2 __endpoint annotation, I'm also making following (small) changes:

  • Enforce that platform be part of trigger annotation - Firebase CLI already assumes that it's included.
  • Endpoint secret environment variable annotation (for v1 & v2)

src/v2/options.ts Outdated Show resolved Hide resolved
Copy link
Member

@inlined inlined left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally wouldn't have moved HttpsOptions

src/v2/options.ts Outdated Show resolved Hide resolved
opts,
'secretEnvironmentVariables',
'secrets',
(secrets) => secrets.map((secret) => ({ secret, key: secret }))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused. Isn't this specifying both the env var and the secret name? DIdn't we not want to do that in the SDK but in the CLI since (in the future) the build process needs to not set the secret name so that extensions can?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah excellent catch.

@taeold taeold requested a review from colerogers April 29, 2022 05:48
@taeold taeold merged commit c91fd9b into master Apr 29, 2022
@taeold taeold deleted the dl-v2-secrets branch April 29, 2022 20:39
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 this pull request may close these issues.

4 participants