Google Cloud Functions and Doppler

Hi Team,

Are there any good docs on how we may have a cloud function use a doppler env? I don’t think theres a way to specify doppler run in their UI.

Thank you,

Anil

Hi Anil,

You’ve got a couple of options as you’re right, you can’t use the Doppler CLI in the function itself.

  1. The Deploy Cloud Functions GitHub Action that uses the secrets downloaded from Doppler in YAML format (requires Doppler Service Token GitHub Secret and GCP credentials)

  2. Using the gcloud CLI and the --env-vars-file option:

gcloud functions deploy FUNCTION-NAME --env-vars-file <(doppler secrets download --no-file --format yaml)

Hi @avaitla16,

Just wanted to check to see if you settled on a good solution here?