published on Thursday, Nov 12, 2026 by Pulumi
published on Thursday, Nov 12, 2026 by Pulumi
Accepted Permissions
Workers Scripts ReadWorkers Scripts Write
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudflare from "@pulumi/cloudflare";
const exampleWorkersCustomDomain = new cloudflare.WorkersCustomDomain("example_workers_custom_domain", {
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
hostname: "app.example.com",
service: "my-worker",
enabled: true,
previewsEnabled: false,
zoneId: "593c9c94de529bbbfaac7c53ced0447d",
zoneName: "example.com",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_workers_custom_domain = cloudflare.WorkersCustomDomain("example_workers_custom_domain",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
hostname="app.example.com",
service="my-worker",
enabled=True,
previews_enabled=False,
zone_id="593c9c94de529bbbfaac7c53ced0447d",
zone_name="example.com")
package main
import (
"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudflare.NewWorkersCustomDomain(ctx, "example_workers_custom_domain", &cloudflare.WorkersCustomDomainArgs{
AccountId: pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
Hostname: pulumi.String("app.example.com"),
Service: pulumi.String("my-worker"),
Enabled: pulumi.Bool(true),
PreviewsEnabled: pulumi.Bool(false),
ZoneId: pulumi.String("593c9c94de529bbbfaac7c53ced0447d"),
ZoneName: pulumi.String("example.com"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudflare = Pulumi.Cloudflare;
return await Deployment.RunAsync(() =>
{
var exampleWorkersCustomDomain = new Cloudflare.WorkersCustomDomain("example_workers_custom_domain", new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
Hostname = "app.example.com",
Service = "my-worker",
Enabled = true,
PreviewsEnabled = false,
ZoneId = "593c9c94de529bbbfaac7c53ced0447d",
ZoneName = "example.com",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudflare.WorkersCustomDomain;
import com.pulumi.cloudflare.WorkersCustomDomainArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleWorkersCustomDomain = new WorkersCustomDomain("exampleWorkersCustomDomain", WorkersCustomDomainArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.hostname("app.example.com")
.service("my-worker")
.enabled(true)
.previewsEnabled(false)
.zoneId("593c9c94de529bbbfaac7c53ced0447d")
.zoneName("example.com")
.build());
}
}
resources:
exampleWorkersCustomDomain:
type: cloudflare:WorkersCustomDomain
name: example_workers_custom_domain
properties:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
hostname: app.example.com
service: my-worker
enabled: true
previewsEnabled: false
zoneId: 593c9c94de529bbbfaac7c53ced0447d
zoneName: example.com
terraform {
required_providers {
cloudflare = {
source = "pulumi/cloudflare"
}
}
}
resource "cloudflare_workers_custom_domain" "example_workers_custom_domain" {
lifecycle {
create_before_destroy = true
}
account_id = "023e105f4ecef8ad9ca31a8372d0c353"
hostname = "app.example.com"
service = "my-worker"
enabled = true
previews_enabled = false
zone_id = "593c9c94de529bbbfaac7c53ced0447d"
zone_name = "example.com"
}
Create WorkersCustomDomain Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new WorkersCustomDomain(name: string, args: WorkersCustomDomainArgs, opts?: CustomResourceOptions);@overload
def WorkersCustomDomain(resource_name: str,
args: WorkersCustomDomainArgs,
opts: Optional[ResourceOptions] = None)
@overload
def WorkersCustomDomain(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
hostname: Optional[str] = None,
service: Optional[str] = None,
enabled: Optional[bool] = None,
environment: Optional[str] = None,
previews_enabled: Optional[bool] = None,
zone_id: Optional[str] = None,
zone_name: Optional[str] = None)func NewWorkersCustomDomain(ctx *Context, name string, args WorkersCustomDomainArgs, opts ...ResourceOption) (*WorkersCustomDomain, error)public WorkersCustomDomain(string name, WorkersCustomDomainArgs args, CustomResourceOptions? opts = null)
public WorkersCustomDomain(String name, WorkersCustomDomainArgs args)
public WorkersCustomDomain(String name, WorkersCustomDomainArgs args, CustomResourceOptions options)
type: cloudflare:WorkersCustomDomain
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "cloudflare_workers_custom_domain" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args WorkersCustomDomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args WorkersCustomDomainArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WorkersCustomDomainArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkersCustomDomainArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args WorkersCustomDomainArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var workersCustomDomainResource = new Cloudflare.WorkersCustomDomain("workersCustomDomainResource", new()
{
AccountId = "string",
Hostname = "string",
Service = "string",
Enabled = false,
PreviewsEnabled = false,
ZoneId = "string",
ZoneName = "string",
});
example, err := cloudflare.NewWorkersCustomDomain(ctx, "workersCustomDomainResource", &cloudflare.WorkersCustomDomainArgs{
AccountId: pulumi.String("string"),
Hostname: pulumi.String("string"),
Service: pulumi.String("string"),
Enabled: pulumi.Bool(false),
PreviewsEnabled: pulumi.Bool(false),
ZoneId: pulumi.String("string"),
ZoneName: pulumi.String("string"),
})
resource "cloudflare_workers_custom_domain" "workersCustomDomainResource" {
lifecycle {
create_before_destroy = true
}
account_id = "string"
hostname = "string"
service = "string"
enabled = false
previews_enabled = false
zone_id = "string"
zone_name = "string"
}
var workersCustomDomainResource = new WorkersCustomDomain("workersCustomDomainResource", WorkersCustomDomainArgs.builder()
.accountId("string")
.hostname("string")
.service("string")
.enabled(false)
.previewsEnabled(false)
.zoneId("string")
.zoneName("string")
.build());
workers_custom_domain_resource = cloudflare.WorkersCustomDomain("workersCustomDomainResource",
account_id="string",
hostname="string",
service="string",
enabled=False,
previews_enabled=False,
zone_id="string",
zone_name="string")
const workersCustomDomainResource = new cloudflare.WorkersCustomDomain("workersCustomDomainResource", {
accountId: "string",
hostname: "string",
service: "string",
enabled: false,
previewsEnabled: false,
zoneId: "string",
zoneName: "string",
});
type: cloudflare:WorkersCustomDomain
properties:
accountId: string
enabled: false
hostname: string
previewsEnabled: false
service: string
zoneId: string
zoneName: string
WorkersCustomDomain Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The WorkersCustomDomain resource accepts the following input properties:
- 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.
- Enabled bool
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- Environment string
- Worker environment associated with the domain.
- Previews
Enabled bool - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - Zone
Id string - ID of the zone containing the domain hostname.
- Zone
Name string - Name of the zone containing the domain hostname.
- 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.
- Enabled bool
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- Environment string
- Worker environment associated with the domain.
- Previews
Enabled bool - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - Zone
Id string - ID of the zone containing the domain hostname.
- Zone
Name string - Name of the zone containing the domain hostname.
- 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.
- enabled bool
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- environment string
- Worker environment associated with the domain.
- previews_
enabled bool - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - zone_
id string - ID of the zone containing the domain hostname.
- zone_
name string - Name of the zone containing the domain hostname.
- 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.
- enabled Boolean
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- environment String
- Worker environment associated with the domain.
- previews
Enabled Boolean - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - zone
Id String - ID of the zone containing the domain hostname.
- zone
Name String - Name of the zone containing the domain hostname.
- 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.
- enabled boolean
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- environment string
- Worker environment associated with the domain.
- previews
Enabled boolean - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - zone
Id string - ID of the zone containing the domain hostname.
- zone
Name string - Name of the zone containing the domain hostname.
- account_
id str - Identifier.
- hostname str
- 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 str
- Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.
- enabled bool
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- environment str
- Worker environment associated with the domain.
- previews_
enabled bool - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - zone_
id str - ID of the zone containing the domain hostname.
- zone_
name str - Name of the zone containing the domain hostname.
- 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.
- enabled Boolean
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- environment String
- Worker environment associated with the domain.
- previews
Enabled Boolean - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - zone
Id String - ID of the zone containing the domain hostname.
- zone
Name String - Name of the zone containing the domain hostname.
Outputs
All input properties are implicitly available as output properties. Additionally, the WorkersCustomDomain resource produces the following output properties:
Look up Existing WorkersCustomDomain Resource
Get an existing WorkersCustomDomain resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WorkersCustomDomainState, opts?: CustomResourceOptions): WorkersCustomDomain@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
cert_id: Optional[str] = None,
enabled: Optional[bool] = None,
environment: Optional[str] = None,
hostname: Optional[str] = None,
previews_enabled: Optional[bool] = None,
service: Optional[str] = None,
zone_id: Optional[str] = None,
zone_name: Optional[str] = None) -> WorkersCustomDomainfunc GetWorkersCustomDomain(ctx *Context, name string, id IDInput, state *WorkersCustomDomainState, opts ...ResourceOption) (*WorkersCustomDomain, error)public static WorkersCustomDomain Get(string name, Input<string> id, WorkersCustomDomainState? state, CustomResourceOptions? opts = null)public static WorkersCustomDomain get(String name, Output<String> id, WorkersCustomDomainState state, CustomResourceOptions options)resources: existingWorkersCustomDomain: type: cloudflare:WorkersCustomDomain get: id: ${id}import {
to = cloudflare_workers_custom_domain.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state WorkersCustomDomainState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state WorkersCustomDomainState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state WorkersCustomDomainState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state WorkersCustomDomainState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Account
Id string - Identifier.
- Cert
Id string - ID of the TLS certificate issued for the domain.
- Enabled bool
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- Environment 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.
- Previews
Enabled bool - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - 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.
- Account
Id string - Identifier.
- Cert
Id string - ID of the TLS certificate issued for the domain.
- Enabled bool
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- Environment 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.
- Previews
Enabled bool - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - 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.
- account_
id string - Identifier.
- cert_
id string - ID of the TLS certificate issued for the domain.
- enabled bool
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- environment 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.
- previews_
enabled bool - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - 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.
- account
Id String - Identifier.
- cert
Id String - ID of the TLS certificate issued for the domain.
- enabled Boolean
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- environment 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.
- previews
Enabled Boolean - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - 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.
- account
Id string - Identifier.
- cert
Id string - ID of the TLS certificate issued for the domain.
- enabled boolean
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- environment 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.
- previews
Enabled boolean - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - 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.
- account_
id str - Identifier.
- cert_
id str - ID of the TLS certificate issued for the domain.
- enabled bool
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- environment str
- Worker environment associated with the domain.
- hostname str
- 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.
- previews_
enabled bool - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - service str
- Name of the Worker associated with the domain. Requests to the configured hostname will be routed to this Worker.
- zone_
id str - ID of the zone containing the domain hostname.
- zone_
name str - Name of the zone containing the domain hostname.
- account
Id String - Identifier.
- cert
Id String - ID of the TLS certificate issued for the domain.
- enabled Boolean
- Whether the configured hostname is routable for the domain. If disabled, then requests to the configured hostname will not be routed to the configured Worker. If disabled, then preview routing must be enabled, and only subdomains of the configured hostname will be routable.
- environment 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.
- previews
Enabled Boolean - Whether previews are routable for the domain. If enabled, previews will be routable as subdomains of the configured hostname. For example, if the configured hostname is
app.example.com, then requests tomy-feature.app.example.comwill be routed to the preview with slugmy-feature, if such a preview exists. If preview routing is disabled, then hostname routing must be enabled. - 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.
Import
$ pulumi import cloudflare:index/workersCustomDomain:WorkersCustomDomain example '<account_id>/<domain_id>'
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.
published on Thursday, Nov 12, 2026 by Pulumi