Divyendu
CDCloudflare Developers
•Created by Divyendu on 6/27/2024 in #hyperdrive
I am not sure if this fix should happen
3 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
Here is the relevant issue: https://github.com/cloudflare/workers-sdk/issues/6217
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
and then whenever I need cloudflare env context, I need to use .dev.vars in addition to .env
don't know if there are plans to somehow unify .env / .dev.vars
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
AHA! soooooooooo in Remix template, if I have a route in functions/*, I can't run it locally but it can read env vars like normal and gets deployed successfully
BUT if I have a API route via Remix (app/routes/api.health.ts).. then it can't read the env like normal and has to come via loader + Cloudflare context env!
(I guess this is expected but pretty confusing! 😅)
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
https://community.cloudflare.com/t/how-to-access-environment-variables-from-libraries/480041/3
Based on this, I think in workers secrets are not global env vars unlike pages!
Since this code is running in pages context, I think prisma is incorrectly judging it as worker and throwing early
In pages, env vars are available and I should not need to pass the datasource directly to Prisma (so this feels like a bug in Prisma)
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
(since I am using pages, it is surely mislabeled as workers, but I want to know if this is true for workers or not)
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
so my issue is sorted, will create a ticket tomorrow and link here
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
I will file an issue tomorrow!
By the way for the original request, do you need to use .dev.vars file instead of .env?no, I just needed to place the secrets in runtime and I incorrectly thought secrets aren't env var (because they were going to a worker that I didn't know existed)
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
IMO this is a bug.. "wrangler secrets put" actually created a brand new worker from a wrangler.toml that is a pages project and put the secrets there! It should fail instead
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
and point me to the correct place!
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
woud be so nice if wrangler can fail as it can detect that I am using put in a pages project
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
ah okay 🥹 ! thanks for the help, i totally wouldn't have figured this out
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
literally just this
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
almost the default one, deploy is happening to the correct environment/project
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
ah, okay, didn't show up for me
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
>where is it not available?
since I am not accessing it directly, I believe they aren't available in the runtime
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
I was expecting the KEYs to be visible as plain text and value to not be visible
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
oh, if I do secret put, I don't see them in dashboard > settings > env vars
36 replies
CDCloudflare Developers
•Created by Divyendu on 7/4/2024 in #wrangler
Can I refer to env vars in wrangler.toml
So, can I do something like
INNGEST_SIGNING_KEY=$INNGEST_SIGNING_KEY in
wrangler.toml
?36 replies