Skip to content
Start here

Routes

resource cloudflare_workers_route

required Expand Collapse
zone_id: String

Identifier.

pattern: String

Pattern to match incoming requests against. Learn more.

optional Expand Collapse
script?: String

Name of the script to run if the route matches.

computed Expand Collapse
id: String

Identifier.

cloudflare_workers_route

resource "cloudflare_workers_route" "example_workers_route" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  pattern = "example.com/*"
  script = "my-workers-script"
}

data cloudflare_workers_route

required Expand Collapse
route_id: String

Identifier.

zone_id: String

Identifier.

computed Expand Collapse
id: String

Identifier.

pattern: String

Pattern to match incoming requests against. Learn more.

script: String

Name of the script to run if the route matches.

cloudflare_workers_route

data "cloudflare_workers_route" "example_workers_route" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
  route_id = "023e105f4ecef8ad9ca31a8372d0c353"
}

data cloudflare_workers_routes

required Expand Collapse
zone_id: String

Identifier.

optional Expand Collapse
max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

Identifier.

pattern: String

Pattern to match incoming requests against. Learn more.

script: String

Name of the script to run if the route matches.

cloudflare_workers_routes

data "cloudflare_workers_routes" "example_workers_routes" {
  zone_id = "023e105f4ecef8ad9ca31a8372d0c353"
}