terraform-provider-cloudflare icon indicating copy to clipboard operation
terraform-provider-cloudflare copied to clipboard

Support for Workers.dev route

Open mishak87 opened this issue 3 years ago • 5 comments

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 image

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

mishak87 avatar Apr 06 '21 15:04 mishak87

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.

jacobbednarz avatar Apr 06 '21 20:04 jacobbednarz

This isn't currently exposed via the API

How does Wrangler do it?

davidbarratt avatar Sep 26 '21 13:09 davidbarratt

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.

jacobbednarz avatar Sep 26 '21 19:09 jacobbednarz

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.

KeesCBakker avatar Dec 20 '21 14:12 KeesCBakker

Is there an update on this feature?

Hibot12 avatar Jul 31 '22 01:07 Hibot12

I am facing this too.

f3l1x avatar Jan 31 '24 13:01 f3l1x

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.

lukdz avatar Mar 07 '24 08:03 lukdz

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.

jacobbednarz avatar Mar 25 '24 00:03 jacobbednarz