1. Packages
  2. Packages
  3. Auth0 Provider
  4. API Docs
  5. CustomDomainDefault
Viewing docs for Auth0 v3.41.0
published on Tuesday, Apr 28, 2026 by Pulumi
auth0 logo
Viewing docs for Auth0 v3.41.0
published on Tuesday, Apr 28, 2026 by Pulumi

    With this resource, you can configure the default domain for your Auth0 tenant. The default domain is the domain that Auth0 will use for various tenant-level operations. This resource manages the default domain configuration via the custom domains API.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    const myCustomDomain = new auth0.CustomDomain("my_custom_domain", {
        domain: "auth.example.com",
        type: "auth0_managed_certs",
    });
    const _default = new auth0.CustomDomainDefault("default", {domain: myCustomDomain.domain});
    
    import pulumi
    import pulumi_auth0 as auth0
    
    my_custom_domain = auth0.CustomDomain("my_custom_domain",
        domain="auth.example.com",
        type="auth0_managed_certs")
    default = auth0.CustomDomainDefault("default", domain=my_custom_domain.domain)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-auth0/sdk/v3/go/auth0"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myCustomDomain, err := auth0.NewCustomDomain(ctx, "my_custom_domain", &auth0.CustomDomainArgs{
    			Domain: pulumi.String("auth.example.com"),
    			Type:   pulumi.String("auth0_managed_certs"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = auth0.NewCustomDomainDefault(ctx, "default", &auth0.CustomDomainDefaultArgs{
    			Domain: myCustomDomain.Domain,
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Auth0 = Pulumi.Auth0;
    
    return await Deployment.RunAsync(() => 
    {
        var myCustomDomain = new Auth0.Index.CustomDomain("my_custom_domain", new()
        {
            Domain = "auth.example.com",
            Type = "auth0_managed_certs",
        });
    
        var @default = new Auth0.Index.CustomDomainDefault("default", new()
        {
            Domain = myCustomDomain.Domain,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.auth0.CustomDomain;
    import com.pulumi.auth0.CustomDomainArgs;
    import com.pulumi.auth0.CustomDomainDefault;
    import com.pulumi.auth0.CustomDomainDefaultArgs;
    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 myCustomDomain = new CustomDomain("myCustomDomain", CustomDomainArgs.builder()
                .domain("auth.example.com")
                .type("auth0_managed_certs")
                .build());
    
            var default_ = new CustomDomainDefault("default", CustomDomainDefaultArgs.builder()
                .domain(myCustomDomain.domain())
                .build());
    
        }
    }
    
    resources:
      myCustomDomain:
        type: auth0:CustomDomain
        name: my_custom_domain
        properties:
          domain: auth.example.com
          type: auth0_managed_certs
      default:
        type: auth0:CustomDomainDefault
        properties:
          domain: ${myCustomDomain.domain}
    

    Create CustomDomainDefault Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CustomDomainDefault(name: string, args: CustomDomainDefaultArgs, opts?: CustomResourceOptions);
    @overload
    def CustomDomainDefault(resource_name: str,
                            args: CustomDomainDefaultArgs,
                            opts: Optional[ResourceOptions] = None)
    
    @overload
    def CustomDomainDefault(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            domain: Optional[str] = None)
    func NewCustomDomainDefault(ctx *Context, name string, args CustomDomainDefaultArgs, opts ...ResourceOption) (*CustomDomainDefault, error)
    public CustomDomainDefault(string name, CustomDomainDefaultArgs args, CustomResourceOptions? opts = null)
    public CustomDomainDefault(String name, CustomDomainDefaultArgs args)
    public CustomDomainDefault(String name, CustomDomainDefaultArgs args, CustomResourceOptions options)
    
    type: auth0:CustomDomainDefault
    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 CustomDomainDefaultArgs
    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 CustomDomainDefaultArgs
    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 CustomDomainDefaultArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CustomDomainDefaultArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CustomDomainDefaultArgs
    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 customDomainDefaultResource = new Auth0.CustomDomainDefault("customDomainDefaultResource", new()
    {
        Domain = "string",
    });
    
    example, err := auth0.NewCustomDomainDefault(ctx, "customDomainDefaultResource", &auth0.CustomDomainDefaultArgs{
    	Domain: pulumi.String("string"),
    })
    
    var customDomainDefaultResource = new CustomDomainDefault("customDomainDefaultResource", CustomDomainDefaultArgs.builder()
        .domain("string")
        .build());
    
    custom_domain_default_resource = auth0.CustomDomainDefault("customDomainDefaultResource", domain="string")
    
    const customDomainDefaultResource = new auth0.CustomDomainDefault("customDomainDefaultResource", {domain: "string"});
    
    type: auth0:CustomDomainDefault
    properties:
        domain: string
    

    CustomDomainDefault 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 CustomDomainDefault resource accepts the following input properties:

    Domain string
    The custom domain name or canonical domain name to set as the default domain for the tenant.
    Domain string
    The custom domain name or canonical domain name to set as the default domain for the tenant.
    domain String
    The custom domain name or canonical domain name to set as the default domain for the tenant.
    domain string
    The custom domain name or canonical domain name to set as the default domain for the tenant.
    domain str
    The custom domain name or canonical domain name to set as the default domain for the tenant.
    domain String
    The custom domain name or canonical domain name to set as the default domain for the tenant.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CustomDomainDefault Resource

    Get an existing CustomDomainDefault 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?: CustomDomainDefaultState, opts?: CustomResourceOptions): CustomDomainDefault
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            domain: Optional[str] = None) -> CustomDomainDefault
    func GetCustomDomainDefault(ctx *Context, name string, id IDInput, state *CustomDomainDefaultState, opts ...ResourceOption) (*CustomDomainDefault, error)
    public static CustomDomainDefault Get(string name, Input<string> id, CustomDomainDefaultState? state, CustomResourceOptions? opts = null)
    public static CustomDomainDefault get(String name, Output<String> id, CustomDomainDefaultState state, CustomResourceOptions options)
    resources:  _:    type: auth0:CustomDomainDefault    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:
    Domain string
    The custom domain name or canonical domain name to set as the default domain for the tenant.
    Domain string
    The custom domain name or canonical domain name to set as the default domain for the tenant.
    domain String
    The custom domain name or canonical domain name to set as the default domain for the tenant.
    domain string
    The custom domain name or canonical domain name to set as the default domain for the tenant.
    domain str
    The custom domain name or canonical domain name to set as the default domain for the tenant.
    domain String
    The custom domain name or canonical domain name to set as the default domain for the tenant.

    Import

    As this is a singleton resource (one per tenant), it can be imported using the fixed identifier “customDomainDefault”.

    Example:

    $ pulumi import auth0:index/customDomainDefault:CustomDomainDefault default "custom_domain_default"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Auth0 pulumi/pulumi-auth0
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the auth0 Terraform Provider.
    auth0 logo
    Viewing docs for Auth0 v3.41.0
    published on Tuesday, Apr 28, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.