terraform-provider-cloudflare
terraform-provider-cloudflare copied to clipboard
Support for Workers.dev route
Current Terraform version
Terraform v0.14.9
- provider registry.terraform.io/cloudflare/cloudflare v2.19.2
Description
Support for [x] Workers.dev route
toggle equivalent
Use cases
For us lazy people using auto-generated URL to avoid hassle of configuring zones.
Potential Terraform configuration
resource "cloudflare_worker_script" "foo" {
workers_dev_url = true
// ...
}
resource "template_file" "config" {
// ...
vars {
url = cloudflare_worker_script.foo.workers_dev_url
}
}
References
No response
This isn't currently exposed via the API and I'm not totally sure if it would make sense to do so given if you are managing workers, you want a route to associate them with. I'll leave this for now but may close in the future if we can't build up support for it.
This isn't currently exposed via the API
How does Wrangler do it?
The team behind Wrangler is also behind Workers so they were fine with different support policies for using their own API.
This endpoint is now now public and stable so once it is added in cloudflare-go, support can land here.
We have the same problem. We are deploying workers with Terraform, but need to add a dev URL manually. Would be a great help if we could add a workers_dev_url = true
to the Terraform file.
Is there an update on this feature?
I am facing this too.
It's possible to enable the dev route via web UI and then continue to deploy via terraform, which won't detect a diff).
This is still a workaround, and adding an option directly in the provider would be great.
This issue has been closed as we are now tracking this internally with service teams directly. If you would like an update or to be notified when/if the product ships with this change, please reach out to Cloudflare Support or your account team who can watch the internal feature request for you.