Wrangler 1.x allowed CF_ZONE_ID to be set as an environment variable. Does Wrangler 3.x ?

Wrangler 1.x allowed CF_ZONE_ID environment variable to be set to provide the zone ID. Does Wrangler 3.x allow similar to be done? Is it directly supported, or am I required to configure a Zone ID route within the TOML config file?
5 Replies
Peter Belbin
Peter BelbinOP2y ago
I see in a changelog, that there is a note from way-back, that CLOUDFLARE_ACCOUNT_ID should be used instead of CF_ACCOUNT_ID, but, what about CF_ZONE_ID -> CLOUDFLARE_ZONE_ID ?
Erisa
Erisa2y ago
I don't believe this is supported in wrangler 2/3
Peter Belbin
Peter BelbinOP2y ago
So the only way to set the zone ID is within a route = { pattern = "xxxxxx", zone_id = "{zoneID}" } kind of thing in the TOML file?
Erisa
Erisa2y ago
It looks like theres also --routes However unsure on the syntax of it off the top of my head
Peter Belbin
Peter BelbinOP2y ago
Hmmmmm. I see some examples about --routes, but it seems there's just a single url matching mask, rather than also having the zone ID.
Want results from more Discord servers?
Add your server