Skip to content

Conversation

@taeold
Copy link
Contributor

@taeold taeold commented Jul 8, 2024

Values for secret params defined using defineSecret are not supposed to be provided in env files. Instead, secret values should be created and managed in Cloud Secret Manager.

However, users often do include values for secret params in their env files, and today CLI incorrectly treats it as a list due to a bug that assumed that secret values will never be provided in the env files.

The change here treats values for secrets in env files as string.

Fixes firebase/firebase-functions#1567

@taeold taeold requested review from Berlioz and blidd-google July 8, 2024 17:49
@joehan joehan merged commit 587e593 into master Jul 9, 2024
@joehan joehan deleted the dl-secret-params branch July 9, 2024 17:03
@tzappia
Copy link

tzappia commented Jul 10, 2024

Nice to see this fixed! FYI, one of the reasons secrets end up in .env files is because of a bug when using the emulator and a demo- project. As a workaround to the bug, putting an empty secret in the .env file works, but perhaps some devs forget that this is just a workaround and the var should just be empty. See more here: #5520 (comment)

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.

defineSecret creates a list of values in Secret Manager

4 participants