Viewing docs for Cloudflare v6.24.0
published on Thursday, Nov 12, 2026 by Pulumi
published on Thursday, Nov 12, 2026 by Pulumi
Viewing docs for Cloudflare v6.24.0
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 exampleWorkersCustomDomains = cloudflare.getWorkersCustomDomains({
accountId: "023e105f4ecef8ad9ca31a8372d0c353",
enabled: true,
environment: "production",
hostname: "app.example.com",
previewsEnabled: false,
service: "my-worker",
zoneId: "593c9c94de529bbbfaac7c53ced0447d",
zoneName: "example.com",
});
import pulumi
import pulumi_cloudflare as cloudflare
example_workers_custom_domains = cloudflare.get_workers_custom_domains(account_id="023e105f4ecef8ad9ca31a8372d0c353",
enabled=True,
environment="production",
hostname="app.example.com",
previews_enabled=False,
service="my-worker",
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.GetWorkersCustomDomains(ctx, &cloudflare.LookupWorkersCustomDomainsArgs{
AccountId: "023e105f4ecef8ad9ca31a8372d0c353",
Enabled: pulumi.BoolRef(true),
Environment: pulumi.StringRef("production"),
Hostname: pulumi.StringRef("app.example.com"),
PreviewsEnabled: pulumi.BoolRef(false),
Service: pulumi.StringRef("my-worker"),
ZoneId: pulumi.StringRef("593c9c94de529bbbfaac7c53ced0447d"),
ZoneName: pulumi.StringRef("example.com"),
}, nil)
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 exampleWorkersCustomDomains = Cloudflare.GetWorkersCustomDomains.Invoke(new()
{
AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
Enabled = true,
Environment = "production",
Hostname = "app.example.com",
PreviewsEnabled = false,
Service = "my-worker",
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.CloudflareFunctions;
import com.pulumi.cloudflare.inputs.GetWorkersCustomDomainsArgs;
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) {
final var exampleWorkersCustomDomains = CloudflareFunctions.getWorkersCustomDomains(GetWorkersCustomDomainsArgs.builder()
.accountId("023e105f4ecef8ad9ca31a8372d0c353")
.enabled(true)
.environment("production")
.hostname("app.example.com")
.previewsEnabled(false)
.service("my-worker")
.zoneId("593c9c94de529bbbfaac7c53ced0447d")
.zoneName("example.com")
.build());
}
}
variables:
exampleWorkersCustomDomains:
fn::invoke:
function: cloudflare:getWorkersCustomDomains
arguments:
accountId: 023e105f4ecef8ad9ca31a8372d0c353
enabled: true
environment: production
hostname: app.example.com
previewsEnabled: false
service: my-worker
zoneId: 593c9c94de529bbbfaac7c53ced0447d
zoneName: example.com
terraform {
required_providers {
cloudflare = {
source = "pulumi/cloudflare"
}
}
}
data "cloudflare_workers_custom_domains" "exampleWorkersCustomDomains" {
account_id = "023e105f4ecef8ad9ca31a8372d0c353"
enabled = true
environment = "production"
hostname = "app.example.com"
previews_enabled = false
service = "my-worker"
zone_id = "593c9c94de529bbbfaac7c53ced0447d"
zone_name = "example.com"
}
Using getWorkersCustomDomains
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getWorkersCustomDomains(args: GetWorkersCustomDomainsArgs, opts?: InvokeOptions): Promise<GetWorkersCustomDomainsResult>
function getWorkersCustomDomainsOutput(args: GetWorkersCustomDomainsOutputArgs, opts?: InvokeOutputOptions): Output<GetWorkersCustomDomainsResult>def get_workers_custom_domains(account_id: Optional[str] = None,
enabled: Optional[bool] = None,
environment: Optional[str] = None,
hostname: Optional[str] = None,
max_items: Optional[int] = None,
previews_enabled: Optional[bool] = None,
service: Optional[str] = None,
zone_id: Optional[str] = None,
zone_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetWorkersCustomDomainsResult
def get_workers_custom_domains_output(account_id: pulumi.Input[Optional[str]] = None,
enabled: pulumi.Input[Optional[bool]] = None,
environment: pulumi.Input[Optional[str]] = None,
hostname: pulumi.Input[Optional[str]] = None,
max_items: pulumi.Input[Optional[int]] = None,
previews_enabled: pulumi.Input[Optional[bool]] = None,
service: pulumi.Input[Optional[str]] = None,
zone_id: pulumi.Input[Optional[str]] = None,
zone_name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetWorkersCustomDomainsResult]func LookupWorkersCustomDomains(ctx *Context, args *LookupWorkersCustomDomainsArgs, opts ...InvokeOption) (*LookupWorkersCustomDomainsResult, error)
func LookupWorkersCustomDomainsOutput(ctx *Context, args *LookupWorkersCustomDomainsOutputArgs, opts ...InvokeOption) LookupWorkersCustomDomainsResultOutput> Note: This function is named LookupWorkersCustomDomains in the Go SDK.
public static class GetWorkersCustomDomains
{
public static Task<GetWorkersCustomDomainsResult> InvokeAsync(GetWorkersCustomDomainsArgs args, InvokeOptions? opts = null)
public static Output<GetWorkersCustomDomainsResult> Invoke(GetWorkersCustomDomainsInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetWorkersCustomDomainsResult> Invoke(GetWorkersCustomDomainsInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetWorkersCustomDomainsResult> getWorkersCustomDomains(GetWorkersCustomDomainsArgs args, InvokeOptions options)
public static Output<GetWorkersCustomDomainsResult> getWorkersCustomDomains(GetWorkersCustomDomainsArgs args, InvokeOptions options)
public static Output<GetWorkersCustomDomainsResult> getWorkersCustomDomains(GetWorkersCustomDomainsArgs args, InvokeOutputOptions options)
fn::invoke:
function: cloudflare:index/getWorkersCustomDomains:getWorkersCustomDomains
arguments:
# arguments dictionarydata "cloudflare_get_workers_custom_domains" "name" {
# arguments
}The following arguments are supported:
- Account
Id string - Identifier.
- Enabled bool
- Whether the configured hostname is routable for the domain.
- Environment string
- Worker environment associated with the domain.
- Hostname string
- Hostname of the domain.
- Max
Items int - Max items to fetch, default: 1000
- Previews
Enabled bool - Whether previews are routable for 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.
- Account
Id string - Identifier.
- Enabled bool
- Whether the configured hostname is routable for the domain.
- Environment string
- Worker environment associated with the domain.
- Hostname string
- Hostname of the domain.
- Max
Items int - Max items to fetch, default: 1000
- Previews
Enabled bool - Whether previews are routable for 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.
- account_
id string - Identifier.
- enabled bool
- Whether the configured hostname is routable for the domain.
- environment string
- Worker environment associated with the domain.
- hostname string
- Hostname of the domain.
- max_
items number - Max items to fetch, default: 1000
- previews_
enabled bool - Whether previews are routable for 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.
- account
Id String - Identifier.
- enabled Boolean
- Whether the configured hostname is routable for the domain.
- environment String
- Worker environment associated with the domain.
- hostname String
- Hostname of the domain.
- max
Items Integer - Max items to fetch, default: 1000
- previews
Enabled Boolean - Whether previews are routable for 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.
- account
Id string - Identifier.
- enabled boolean
- Whether the configured hostname is routable for the domain.
- environment string
- Worker environment associated with the domain.
- hostname string
- Hostname of the domain.
- max
Items number - Max items to fetch, default: 1000
- previews
Enabled boolean - Whether previews are routable for 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.
- account_
id str - Identifier.
- enabled bool
- Whether the configured hostname is routable for the domain.
- environment str
- Worker environment associated with the domain.
- hostname str
- Hostname of the domain.
- max_
items int - Max items to fetch, default: 1000
- previews_
enabled bool - Whether previews are routable for the domain.
- service str
- Name of the Worker associated with the domain.
- 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.
- enabled Boolean
- Whether the configured hostname is routable for the domain.
- environment String
- Worker environment associated with the domain.
- hostname String
- Hostname of the domain.
- max
Items Number - Max items to fetch, default: 1000
- previews
Enabled Boolean - Whether previews are routable for 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.
getWorkersCustomDomains Result
The following output properties are available:
- Account
Id string - Identifier.
- Results
List<Get
Workers Custom Domains Result> - The items returned by the data source
- Enabled bool
- Whether the configured hostname is routable for the domain.
- Environment string
- Worker environment associated with the domain.
- Hostname string
- Hostname of the domain.
- Max
Items int - Max items to fetch, default: 1000
- Previews
Enabled bool - Whether previews are routable for 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.
- Account
Id string - Identifier.
- Results
[]Get
Workers Custom Domains Result - The items returned by the data source
- Enabled bool
- Whether the configured hostname is routable for the domain.
- Environment string
- Worker environment associated with the domain.
- Hostname string
- Hostname of the domain.
- Max
Items int - Max items to fetch, default: 1000
- Previews
Enabled bool - Whether previews are routable for 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.
- account_
id string - Identifier.
- results list(object)
- The items returned by the data source
- enabled bool
- Whether the configured hostname is routable for the domain.
- environment string
- Worker environment associated with the domain.
- hostname string
- Hostname of the domain.
- max_
items number - Max items to fetch, default: 1000
- previews_
enabled bool - Whether previews are routable for 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.
- account
Id String - Identifier.
- results
List<Get
Workers Custom Domains Result> - The items returned by the data source
- enabled Boolean
- Whether the configured hostname is routable for the domain.
- environment String
- Worker environment associated with the domain.
- hostname String
- Hostname of the domain.
- max
Items Integer - Max items to fetch, default: 1000
- previews
Enabled Boolean - Whether previews are routable for 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.
- account
Id string - Identifier.
- results
Get
Workers Custom Domains Result[] - The items returned by the data source
- enabled boolean
- Whether the configured hostname is routable for the domain.
- environment string
- Worker environment associated with the domain.
- hostname string
- Hostname of the domain.
- max
Items number - Max items to fetch, default: 1000
- previews
Enabled boolean - Whether previews are routable for 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.
- account_
id str - Identifier.
- results
Sequence[Get
Workers Custom Domains Result] - The items returned by the data source
- enabled bool
- Whether the configured hostname is routable for the domain.
- environment str
- Worker environment associated with the domain.
- hostname str
- Hostname of the domain.
- max_
items int - Max items to fetch, default: 1000
- previews_
enabled bool - Whether previews are routable for the domain.
- service str
- Name of the Worker associated with the domain.
- 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.
- results List<Property Map>
- The items returned by the data source
- enabled Boolean
- Whether the configured hostname is routable for the domain.
- environment String
- Worker environment associated with the domain.
- hostname String
- Hostname of the domain.
- max
Items Number - Max items to fetch, default: 1000
- previews
Enabled Boolean - Whether previews are routable for 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.
Supporting Types
GetWorkersCustomDomainsResult
- 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.
- Id string
- Immutable ID of 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. - 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.
- 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.
- Id string
- Immutable ID of 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. - 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.
- 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.
- id string
- Immutable ID of 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. - 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.
- 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.
- id String
- Immutable ID of 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. - 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.
- 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.
- id string
- Immutable ID of 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. - 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.
- 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.
- id str
- Immutable ID of 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. - 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.
- 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.
- id String
- Immutable ID of 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. - 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.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflareTerraform Provider.
Viewing docs for Cloudflare v6.24.0
published on Thursday, Nov 12, 2026 by Pulumi
published on Thursday, Nov 12, 2026 by Pulumi