Is it possible to create a worker/
Is it possible to create a worker/project before deploying?
17 Replies
Basically I'd like to set secrets before the project deploys
I know you can via Wrangler, but I don't think so via the Dashboard
via wrangler, specifically
I'm rolling through the docs looking and coming up empty
Or well, it still creates a "deploy", but with a stub, basically
At least if I remember correctly
oh, hmm, maybe --dry-run?
Afaik,
--dry-run
wouldn't upload anything, so that isn't what you want
Try wrangler secret put SECRET_NAME
right, that fails though
because there's no worker
this is my dilemma
i could try deploying some kind of empty "noop" file?
What
wrangler -v
version are you on?3.99
Here's what I have:
right, i'm specifying the worker name on the command line
e.g.
wrangler secret put FOOBAR --name myname
oic you're prompted to make itLet me see if I can replicate with the name on the command line...
sec
dont waste your time, on it
ah, it's because i'm not setting a variable, i'm using
wrangler secret list --name workername
which, im not surprised wouldnt create a workerOh, yeah, that makes sense
ok ... i'm good 🙂 i got mixed around, apologies
(i still think it would be nice to be able to just create an empty worker)
via wrangler
All good, no worries!
Wrangler is open-source, you could make a feature request Issue for it: https://github.com/cloudflare/workers-sdk
GitHub
GitHub - cloudflare/workers-sdk: ⛅️ Home to Wrangler, the CLI for C...
⛅️ Home to Wrangler, the CLI for Cloudflare Workers® - cloudflare/workers-sdk