plain text environment variables are not available under env
when I set encrypted secrets, they're shown in
env.SOME_SECRET
, for example.
if I set a plain text variable in the CF dashboard, env.SOME_PLAIN_TEXT
is NOT available
what gives?8 Replies
are you using nuxt?
remix
so I had to put all my plain text variables in my toml file (which then creates another set of issues https://github.com/cloudflare/workers-sdk/issues/6931)
but really I'd like to manage everything from the dashboard. I don't see the point of having to manage things from two places
Ah yeah if you use wrangler.toml that becomes your source of truth
You can not use it and fully use dash though if you wanted
are you saying that if I remove my wrangler toml file, it should work?
but that also makes no sense because secrets were working just fine. onyl plain text variables were not being passed to my page context
Yes
And secrets are special
since they don't have content stored anyway, they cannot be put in a wrangler.toml and are a set-once thing. They do indeed work in dash or elsewhere
and if I wanna use plain text variables locally I just put them in .dev.vars as well? (assuming I remove my toml file)
also, if I remove my toml file I won't be able to do this:
because I can't set the local values anymore 😦
yeah you'd need to manage that in the dashboard too, for local you'd need to do --d1=xx
unfortunately I'm using remix+vite+remixCloudflareDevProxy, so I can't use any CLI options
(like any other person running remix on CF)