Worker plaintext env vars that are modifiable AND persisted across deploys?
Is there a way to have a Worker env var such that:
1. plaintext (current value is visible in dashboard)
2. Modifiable in the dashboard
3. Your dashboard modifications are persisted through Worker deployments
In my testing, the plaintext vars are always clobbered on the next deploy:
A) Create a net-new env var from the dashboard -> removed on next deploy
B) Have a var defined in the wrangler.jsonc -> value is always overwritten with the value in wrangler on each deploy
1 Reply
https://developers.cloudflare.com/workers/wrangler/configuration/#top-level-only-keys
keep_vars is what you want!
Cloudflare Docs
Configuration
Use a configuration file to customize the development and deployment setup for your Worker project and other Developer Platform products.