workers generated from Terraform have a "dev" rout...
# workers-help
g
We are kicking the tyres of the Cloudflare ecosystem. We're using Terraform to stand up some infrastructure: - a KV store - a number of workers that have the KV store bound to them We can successfully deploy the workers but they come with a automatically created route that is not under the control of Terraform e.g.
delete_todo_dev.somedomain.workers.dev    somedomain.workers.dev
This route is disabled by default and can only be enabled in the UI. We are trying to enable the routes in Terraform so that we output the route's URL but as we didn't create the route, we can't interact with it. How is a Terraform project meant to create and manage routes programmatically? If we use the Wrangler tool, then the route gets enabled on creation but using Terraform it doesn't. We'd rather use Terraform than use Wrangler in a shell script, for obvious reasons. Any best practice advise is very welcome.
k
The
workers.dev
thing is automatic & every Worker has one, but Wrangler let's you disable it with
workers_dev = false
Your own custom routes are under `cloudflare_worker_route`/`cloudflare_worker_domain` resources