[Resolved] Product Environment Variables not appearing in Cloudflare dashboard
I've got some environment variables for both preview and production envs in the
wrangler.toml
file of my pages application, but when deploy the application with wrangler, only the preview env vars are appearing in the cloudflare dash.
Here are the contents of my wrangler.toml
(private values obviously removed):
Does anybody have any suggestions as to why my Production environment variables are not showing up in the dashboard, whilst the Preview vars are?
Thanks.
Edit: These deployments are from a non-main
branch... I'm now wondering if deploying a preview branch (and not the prod branch) is the reason these aren't being applied 🤔2 Replies
Yup, answered my own question. I had to deploy the
main
branch for the production env vars in my wrangler.toml
to be applied. I didn't spot anywhere in the docs where this was specified, but I guess I missed it.
Question resolved!does [[env.preview.d1_databases]] and [[env.production.d1_databases]] work for you ?
i am a little confused about this configuration. can you please guide me @peeb