Skip to content
Start here

Domains

resource cloudflare_workers_custom_domain

required Expand Collapse
account_id: String

Identifier.

hostname: String

Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.

service: String

Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.

optional Expand Collapse
Deprecatedenvironment?: String

Worker environment associated with the domain.

zone_id?: String

ID of the zone containing the domain hostname.

zone_name?: String

Name of the zone containing the domain hostname.

computed Expand Collapse
id: String

Immutable ID of the domain.

cert_id: String

ID of the TLS certificate issued for the domain.

cloudflare_workers_custom_domain

resource "cloudflare_workers_custom_domain" "example_workers_custom_domain" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  hostname = "app.example.com"
  service = "my-worker"
  environment = "production"
  zone_id = "593c9c94de529bbbfaac7c53ced0447d"
  zone_name = "example.com"
}

data cloudflare_workers_custom_domain

required Expand Collapse
account_id: String

Identifier.

optional Expand Collapse
domain_id?: String

ID of the domain.

filter?: Attributes
environment?: String

Worker environment associated with the domain.

hostname?: String

Hostname of the domain.

service?: String

Name of the Worker associated with the domain.

zone_id?: String

ID of the zone containing the domain hostname.

zone_name?: String

Name of the zone containing the domain hostname.

computed Expand Collapse
id: String

ID of the domain.

cert_id: String

ID of the TLS certificate issued for the domain.

Deprecatedenvironment: String

Worker environment associated with the domain.

hostname: String

Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.

service: String

Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.

zone_id: String

ID of the zone containing the domain hostname.

zone_name: String

Name of the zone containing the domain hostname.

cloudflare_workers_custom_domain

data "cloudflare_workers_custom_domain" "example_workers_custom_domain" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  domain_id = "dbe10b4bc17c295377eabd600e1787fd"
}

data cloudflare_workers_custom_domains

required Expand Collapse
account_id: String

Identifier.

optional Expand Collapse
environment?: String

Worker environment associated with the domain.

hostname?: String

Hostname of the domain.

service?: String

Name of the Worker associated with the domain.

zone_id?: String

ID of the zone containing the domain hostname.

zone_name?: String

Name of the zone containing the domain hostname.

max_items?: Int64

Max items to fetch, default: 1000

computed Expand Collapse
result: List[Attributes]

The items returned by the data source

id: String

Immutable ID of the domain.

cert_id: String

ID of the TLS certificate issued for the domain.

Deprecatedenvironment: String

Worker environment associated with the domain.

hostname: String

Hostname of the domain. Can be either the zone apex or a subdomain of the zone. Requests to this hostname will be routed to the configured Worker.

service: String

Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.

zone_id: String

ID of the zone containing the domain hostname.

zone_name: String

Name of the zone containing the domain hostname.

cloudflare_workers_custom_domains

data "cloudflare_workers_custom_domains" "example_workers_custom_domains" {
  account_id = "023e105f4ecef8ad9ca31a8372d0c353"
  environment = "production"
  hostname = "app.example.com"
  service = "my-worker"
  zone_id = "593c9c94de529bbbfaac7c53ced0447d"
  zone_name = "example.com"
}