What happened to CF_ZONE_ID in Wrangler 3?
# workers-help
p
I see with current Wrangler documentation a mention of 'Zone ID route' (https://developers.cloudflare.com/workers/wrangler/configuration/#zone-id-route) in the config file, but, for security reasons, we don't want the information stored in flat files in any case. I see here (https://developers.cloudflare.com/workers/wrangler/system-environment-variables/#supported-environment-variables) that dynamically defining CLOUDFLARE_ACCOUNT_ID & CLOUDFLARE_API_TOKEN appear to be the go-forward environment variables to use with
wrangler deploy
, but, I don't see in the documentation any mention of CF_ZONE_ID or a new CLOUDFLARE_ZONE_ID being supported. Is it? Or, is there some other thing that should be done instead? Please advise.
CF_ZONE_ID being provided as an environment variable was supported in the past as evidenced here https://github.com/cloudflare/wrangler-legacy/issues/985
c
Looks like it never got carried over to Wrangler 2.x or 3.x. Not too surprising, 2.x was a complete rewrite in Javascript rather then Rust. For what it's worth, Zone ID, Account ID and most other IDs, are not "secrets" in any way. They're purely random and perfectly ok to be shared/made public/etc. You can use zone_name with route bindings as well
p
Thank you for the response, even if the result seems disappointing. Yeah, I pulled code for the 1.x Wrangler, and see the Zone ID there, and did likewise for 3.x and 2.x code, but do not see the Zone ID in either the 2.x or 3.x code. 😦. Is it possible that this means the desired result can be obtained without needing to specifiy the Zone ID (or name for that matter)? Hmmm. Perhaps. But if not, then yeah, that's a hassle.