1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. WorkersCustomDomain
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.WorkersCustomDomain

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleWorkersCustomDomain = new cloudflare.WorkersCustomDomain("example_workers_custom_domain", {
        accountId: "9a7806061c88ada191ed06f989cc3dac",
        environment: "production",
        hostname: "foo.example.com",
        service: "foo",
        zoneId: "593c9c94de529bbbfaac7c53ced0447d",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_workers_custom_domain = cloudflare.WorkersCustomDomain("example_workers_custom_domain",
        account_id="9a7806061c88ada191ed06f989cc3dac",
        environment="production",
        hostname="foo.example.com",
        service="foo",
        zone_id="593c9c94de529bbbfaac7c53ced0447d")
    
    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("9a7806061c88ada191ed06f989cc3dac"),
    			Environment: pulumi.String("production"),
    			Hostname:    pulumi.String("foo.example.com"),
    			Service:     pulumi.String("foo"),
    			ZoneId:      pulumi.String("593c9c94de529bbbfaac7c53ced0447d"),
    		})
    		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 = "9a7806061c88ada191ed06f989cc3dac",
            Environment = "production",
            Hostname = "foo.example.com",
            Service = "foo",
            ZoneId = "593c9c94de529bbbfaac7c53ced0447d",
        });
    
    });
    
    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.List;
    import java.util.ArrayList;
    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("9a7806061c88ada191ed06f989cc3dac")
                .environment("production")
                .hostname("foo.example.com")
                .service("foo")
                .zoneId("593c9c94de529bbbfaac7c53ced0447d")
                .build());
    
        }
    }
    
    resources:
      exampleWorkersCustomDomain:
        type: cloudflare:WorkersCustomDomain
        name: example_workers_custom_domain
        properties:
          accountId: 9a7806061c88ada191ed06f989cc3dac
          environment: production
          hostname: foo.example.com
          service: foo
          zoneId: 593c9c94de529bbbfaac7c53ced0447d
    

    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,
                            environment: Optional[str] = None,
                            hostname: Optional[str] = None,
                            service: Optional[str] = None,
                            zone_id: 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.
    
    

    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",
        Environment = "string",
        Hostname = "string",
        Service = "string",
        ZoneId = "string",
    });
    
    example, err := cloudflare.NewWorkersCustomDomain(ctx, "workersCustomDomainResource", &cloudflare.WorkersCustomDomainArgs{
    	AccountId:   pulumi.String("string"),
    	Environment: pulumi.String("string"),
    	Hostname:    pulumi.String("string"),
    	Service:     pulumi.String("string"),
    	ZoneId:      pulumi.String("string"),
    })
    
    var workersCustomDomainResource = new WorkersCustomDomain("workersCustomDomainResource", WorkersCustomDomainArgs.builder()
        .accountId("string")
        .environment("string")
        .hostname("string")
        .service("string")
        .zoneId("string")
        .build());
    
    workers_custom_domain_resource = cloudflare.WorkersCustomDomain("workersCustomDomainResource",
        account_id="string",
        environment="string",
        hostname="string",
        service="string",
        zone_id="string")
    
    const workersCustomDomainResource = new cloudflare.WorkersCustomDomain("workersCustomDomainResource", {
        accountId: "string",
        environment: "string",
        hostname: "string",
        service: "string",
        zoneId: "string",
    });
    
    type: cloudflare:WorkersCustomDomain
    properties:
        accountId: string
        environment: string
        hostname: string
        service: string
        zoneId: 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:

    AccountId string
    Identifer of the account.
    Environment string
    Worker environment associated with the zone and hostname.
    Hostname string
    Hostname of the Worker Domain.
    Service string
    Worker service associated with the zone and hostname.
    ZoneId string
    Identifier of the zone.
    AccountId string
    Identifer of the account.
    Environment string
    Worker environment associated with the zone and hostname.
    Hostname string
    Hostname of the Worker Domain.
    Service string
    Worker service associated with the zone and hostname.
    ZoneId string
    Identifier of the zone.
    accountId String
    Identifer of the account.
    environment String
    Worker environment associated with the zone and hostname.
    hostname String
    Hostname of the Worker Domain.
    service String
    Worker service associated with the zone and hostname.
    zoneId String
    Identifier of the zone.
    accountId string
    Identifer of the account.
    environment string
    Worker environment associated with the zone and hostname.
    hostname string
    Hostname of the Worker Domain.
    service string
    Worker service associated with the zone and hostname.
    zoneId string
    Identifier of the zone.
    account_id str
    Identifer of the account.
    environment str
    Worker environment associated with the zone and hostname.
    hostname str
    Hostname of the Worker Domain.
    service str
    Worker service associated with the zone and hostname.
    zone_id str
    Identifier of the zone.
    accountId String
    Identifer of the account.
    environment String
    Worker environment associated with the zone and hostname.
    hostname String
    Hostname of the Worker Domain.
    service String
    Worker service associated with the zone and hostname.
    zoneId String
    Identifier of the zone.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WorkersCustomDomain resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    ZoneName string
    Name of the zone.
    Id string
    The provider-assigned unique ID for this managed resource.
    ZoneName string
    Name of the zone.
    id String
    The provider-assigned unique ID for this managed resource.
    zoneName String
    Name of the zone.
    id string
    The provider-assigned unique ID for this managed resource.
    zoneName string
    Name of the zone.
    id str
    The provider-assigned unique ID for this managed resource.
    zone_name str
    Name of the zone.
    id String
    The provider-assigned unique ID for this managed resource.
    zoneName String
    Name of the zone.

    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,
            environment: Optional[str] = None,
            hostname: Optional[str] = None,
            service: Optional[str] = None,
            zone_id: Optional[str] = None,
            zone_name: Optional[str] = None) -> WorkersCustomDomain
    func 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:  _:    type: cloudflare:WorkersCustomDomain    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    Identifer of the account.
    Environment string
    Worker environment associated with the zone and hostname.
    Hostname string
    Hostname of the Worker Domain.
    Service string
    Worker service associated with the zone and hostname.
    ZoneId string
    Identifier of the zone.
    ZoneName string
    Name of the zone.
    AccountId string
    Identifer of the account.
    Environment string
    Worker environment associated with the zone and hostname.
    Hostname string
    Hostname of the Worker Domain.
    Service string
    Worker service associated with the zone and hostname.
    ZoneId string
    Identifier of the zone.
    ZoneName string
    Name of the zone.
    accountId String
    Identifer of the account.
    environment String
    Worker environment associated with the zone and hostname.
    hostname String
    Hostname of the Worker Domain.
    service String
    Worker service associated with the zone and hostname.
    zoneId String
    Identifier of the zone.
    zoneName String
    Name of the zone.
    accountId string
    Identifer of the account.
    environment string
    Worker environment associated with the zone and hostname.
    hostname string
    Hostname of the Worker Domain.
    service string
    Worker service associated with the zone and hostname.
    zoneId string
    Identifier of the zone.
    zoneName string
    Name of the zone.
    account_id str
    Identifer of the account.
    environment str
    Worker environment associated with the zone and hostname.
    hostname str
    Hostname of the Worker Domain.
    service str
    Worker service associated with the zone and hostname.
    zone_id str
    Identifier of the zone.
    zone_name str
    Name of the zone.
    accountId String
    Identifer of the account.
    environment String
    Worker environment associated with the zone and hostname.
    hostname String
    Hostname of the Worker Domain.
    service String
    Worker service associated with the zone and hostname.
    zoneId String
    Identifier of the zone.
    zoneName String
    Name of the zone.

    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 cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi