Shared secrets across workers
I wanna build a monorepo of multiple workers and wondering if it's possible to provide the path to the
.dev.vars file or its directory in the wrangler config?
Something like this:
This is a basic necessity to provide shared environment variables across apps. I hope it's possible. Thank you.
3 Replies
The best way to share secrets would be using secret store - https://developers.cloudflare.com/secrets-store/
I will check this out. I like that they are assigned to your account so you dont have to bother keeping them in sync across your devices. But I hope we'll also have a possibility to store them in code and the separation into
.dev.vars and .env disappears.
Thank youCloudflare Docs
Wrangler and the Cloudflare Vite plugin support
.env files in loc...Use
.env files to provide secrets and override environment variables on the env object during local development.