DopplerHQ / cli

The official CLI for interacting with your Doppler secrets and configuration.
https://docs.doppler.com
Apache License 2.0
214 stars 43 forks source link

[FEATURE] Update Cloudflare Workers secret upload example #376

Closed EFEXP closed 1 year ago

EFEXP commented 1 year ago

Is your feature request related to a problem? Please describe.

The current Doppler documentation appears to require a hack to upload Secrets to Cloudflare Workers. However, Wrangler now has a bulk upload feature that makes uploading a breeze.

Describe the solution you'd like

We already run this command for effortless uploading. wrangler secret:bulk <(doppler secrets --json | jq -c 'with_entries(.value = .value.computed)')

Piccirello commented 1 year ago

Thanks for opening this! I've updated our Cloudflare Worker docs.

hmnd commented 1 year ago

@EFEXP is it just me or does wrangler only support a file path as input for secret:bulk now?

EFEXP commented 1 year ago

@hmnd <(command) This syntax is process substitution. It creates a temporary file and outputs the path to that file !

hmnd commented 1 year ago

@EFEXP ahh, right. Nevertheless, when I try to run that, wrangler just hangs forever and doesn't even respond to ^C. Might have to open an issue in the wrangler repo instead

watsonian commented 1 year ago

@hmnd Just to confirm, when you run the Doppler command by hand all by itself – you get the output you expect, right? The command listed above will only work if you already ran doppler setup in the directory in question (otherwise you need to specify -p and -c flags to specify the project and config). Not sure if running that having not performed the setup would result in hanging or an error, but figured I'd point this out just in case!