1. Packages
  2. Auth0 Provider
  3. API Docs
  4. getCustomDomain
Auth0 v3.27.0 published on Wednesday, Sep 10, 2025 by Pulumi

auth0.getCustomDomain

Explore with Pulumi AI

auth0 logo
Auth0 v3.27.0 published on Wednesday, Sep 10, 2025 by Pulumi

    Data source to retrieve the custom domain configuration.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as auth0 from "@pulumi/auth0";
    
    const myCustomDomain = new auth0.CustomDomain("my_custom_domain", {
        domain: "example.auth.tempdomain.com",
        type: "auth0_managed_certs",
        tlsPolicy: "recommended",
        domainMetadata: {
            key1: "value1",
            key2: "value2",
        },
    });
    const test = auth0.getCustomDomainOutput({
        customDomainId: myCustomDomain.id,
    });
    
    import pulumi
    import pulumi_auth0 as auth0
    
    my_custom_domain = auth0.CustomDomain("my_custom_domain",
        domain="example.auth.tempdomain.com",
        type="auth0_managed_certs",
        tls_policy="recommended",
        domain_metadata={
            "key1": "value1",
            "key2": "value2",
        })
    test = auth0.get_custom_domain_output(custom_domain_id=my_custom_domain.id)
    
    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("example.auth.tempdomain.com"),
    			Type:      pulumi.String("auth0_managed_certs"),
    			TlsPolicy: pulumi.String("recommended"),
    			DomainMetadata: pulumi.StringMap{
    				"key1": pulumi.String("value1"),
    				"key2": pulumi.String("value2"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_ = auth0.LookupCustomDomainOutput(ctx, auth0.GetCustomDomainOutputArgs{
    			CustomDomainId: myCustomDomain.ID(),
    		}, nil)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Auth0 = Pulumi.Auth0;
    
    return await Deployment.RunAsync(() => 
    {
        var myCustomDomain = new Auth0.CustomDomain("my_custom_domain", new()
        {
            Domain = "example.auth.tempdomain.com",
            Type = "auth0_managed_certs",
            TlsPolicy = "recommended",
            DomainMetadata = 
            {
                { "key1", "value1" },
                { "key2", "value2" },
            },
        });
    
        var test = Auth0.GetCustomDomain.Invoke(new()
        {
            CustomDomainId = myCustomDomain.Id,
        });
    
    });
    
    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.Auth0Functions;
    import com.pulumi.auth0.inputs.GetCustomDomainArgs;
    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("example.auth.tempdomain.com")
                .type("auth0_managed_certs")
                .tlsPolicy("recommended")
                .domainMetadata(Map.ofEntries(
                    Map.entry("key1", "value1"),
                    Map.entry("key2", "value2")
                ))
                .build());
    
            final var test = Auth0Functions.getCustomDomain(GetCustomDomainArgs.builder()
                .customDomainId(myCustomDomain.id())
                .build());
    
        }
    }
    
    resources:
      myCustomDomain:
        type: auth0:CustomDomain
        name: my_custom_domain
        properties:
          domain: example.auth.tempdomain.com
          type: auth0_managed_certs
          tlsPolicy: recommended
          domainMetadata:
            key1: value1
            key2: value2
    variables:
      test:
        fn::invoke:
          function: auth0:getCustomDomain
          arguments:
            customDomainId: ${myCustomDomain.id}
    

    Using getCustomDomain

    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 getCustomDomain(args: GetCustomDomainArgs, opts?: InvokeOptions): Promise<GetCustomDomainResult>
    function getCustomDomainOutput(args: GetCustomDomainOutputArgs, opts?: InvokeOptions): Output<GetCustomDomainResult>
    def get_custom_domain(custom_domain_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetCustomDomainResult
    def get_custom_domain_output(custom_domain_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetCustomDomainResult]
    func LookupCustomDomain(ctx *Context, args *LookupCustomDomainArgs, opts ...InvokeOption) (*LookupCustomDomainResult, error)
    func LookupCustomDomainOutput(ctx *Context, args *LookupCustomDomainOutputArgs, opts ...InvokeOption) LookupCustomDomainResultOutput

    > Note: This function is named LookupCustomDomain in the Go SDK.

    public static class GetCustomDomain 
    {
        public static Task<GetCustomDomainResult> InvokeAsync(GetCustomDomainArgs args, InvokeOptions? opts = null)
        public static Output<GetCustomDomainResult> Invoke(GetCustomDomainInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCustomDomainResult> getCustomDomain(GetCustomDomainArgs args, InvokeOptions options)
    public static Output<GetCustomDomainResult> getCustomDomain(GetCustomDomainArgs args, InvokeOptions options)
    
    fn::invoke:
      function: auth0:index/getCustomDomain:getCustomDomain
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CustomDomainId string
    The ID of the Custom Domain.
    CustomDomainId string
    The ID of the Custom Domain.
    customDomainId String
    The ID of the Custom Domain.
    customDomainId string
    The ID of the Custom Domain.
    custom_domain_id str
    The ID of the Custom Domain.
    customDomainId String
    The ID of the Custom Domain.

    getCustomDomain Result

    The following output properties are available:

    Certificates List<GetCustomDomainCertificate>
    The Custom Domain certificate.
    CustomClientIpHeader string
    The HTTP header to fetch the client's IP address. Cannot be set on auth0_managed domains.
    Domain string
    Name of the custom domain.
    DomainMetadata Dictionary<string, string>
    Metadata associated with the Custom Domain. Maximum of 10 metadata properties allowed.
    Id string
    The provider-assigned unique ID for this managed resource.
    OriginDomainName string
    Once the configuration status is ready, the DNS name of the Auth0 origin server that handles traffic for the custom domain.
    Primary bool
    Indicates whether this is a primary domain.
    Status string
    Configuration status for the custom domain. Options include disabled, pending, pending_verification, and ready.
    TlsPolicy string
    TLS policy for the custom domain. Available options are: compatible or recommended. Compatible includes TLS 1.0, 1.1, 1.2, and recommended only includes TLS 1.2. Cannot be set on self_managed domains.
    Type string
    Provisioning type for the custom domain. Options include auth0_managed_certs and self_managed_certs.
    Verifications List<GetCustomDomainVerification>
    Configuration settings for verification.
    CustomDomainId string
    The ID of the Custom Domain.
    Certificates []GetCustomDomainCertificate
    The Custom Domain certificate.
    CustomClientIpHeader string
    The HTTP header to fetch the client's IP address. Cannot be set on auth0_managed domains.
    Domain string
    Name of the custom domain.
    DomainMetadata map[string]string
    Metadata associated with the Custom Domain. Maximum of 10 metadata properties allowed.
    Id string
    The provider-assigned unique ID for this managed resource.
    OriginDomainName string
    Once the configuration status is ready, the DNS name of the Auth0 origin server that handles traffic for the custom domain.
    Primary bool
    Indicates whether this is a primary domain.
    Status string
    Configuration status for the custom domain. Options include disabled, pending, pending_verification, and ready.
    TlsPolicy string
    TLS policy for the custom domain. Available options are: compatible or recommended. Compatible includes TLS 1.0, 1.1, 1.2, and recommended only includes TLS 1.2. Cannot be set on self_managed domains.
    Type string
    Provisioning type for the custom domain. Options include auth0_managed_certs and self_managed_certs.
    Verifications []GetCustomDomainVerificationType
    Configuration settings for verification.
    CustomDomainId string
    The ID of the Custom Domain.
    certificates List<GetCustomDomainCertificate>
    The Custom Domain certificate.
    customClientIpHeader String
    The HTTP header to fetch the client's IP address. Cannot be set on auth0_managed domains.
    domain String
    Name of the custom domain.
    domainMetadata Map<String,String>
    Metadata associated with the Custom Domain. Maximum of 10 metadata properties allowed.
    id String
    The provider-assigned unique ID for this managed resource.
    originDomainName String
    Once the configuration status is ready, the DNS name of the Auth0 origin server that handles traffic for the custom domain.
    primary Boolean
    Indicates whether this is a primary domain.
    status String
    Configuration status for the custom domain. Options include disabled, pending, pending_verification, and ready.
    tlsPolicy String
    TLS policy for the custom domain. Available options are: compatible or recommended. Compatible includes TLS 1.0, 1.1, 1.2, and recommended only includes TLS 1.2. Cannot be set on self_managed domains.
    type String
    Provisioning type for the custom domain. Options include auth0_managed_certs and self_managed_certs.
    verifications List<GetCustomDomainVerification>
    Configuration settings for verification.
    customDomainId String
    The ID of the Custom Domain.
    certificates GetCustomDomainCertificate[]
    The Custom Domain certificate.
    customClientIpHeader string
    The HTTP header to fetch the client's IP address. Cannot be set on auth0_managed domains.
    domain string
    Name of the custom domain.
    domainMetadata {[key: string]: string}
    Metadata associated with the Custom Domain. Maximum of 10 metadata properties allowed.
    id string
    The provider-assigned unique ID for this managed resource.
    originDomainName string
    Once the configuration status is ready, the DNS name of the Auth0 origin server that handles traffic for the custom domain.
    primary boolean
    Indicates whether this is a primary domain.
    status string
    Configuration status for the custom domain. Options include disabled, pending, pending_verification, and ready.
    tlsPolicy string
    TLS policy for the custom domain. Available options are: compatible or recommended. Compatible includes TLS 1.0, 1.1, 1.2, and recommended only includes TLS 1.2. Cannot be set on self_managed domains.
    type string
    Provisioning type for the custom domain. Options include auth0_managed_certs and self_managed_certs.
    verifications GetCustomDomainVerification[]
    Configuration settings for verification.
    customDomainId string
    The ID of the Custom Domain.
    certificates Sequence[GetCustomDomainCertificate]
    The Custom Domain certificate.
    custom_client_ip_header str
    The HTTP header to fetch the client's IP address. Cannot be set on auth0_managed domains.
    domain str
    Name of the custom domain.
    domain_metadata Mapping[str, str]
    Metadata associated with the Custom Domain. Maximum of 10 metadata properties allowed.
    id str
    The provider-assigned unique ID for this managed resource.
    origin_domain_name str
    Once the configuration status is ready, the DNS name of the Auth0 origin server that handles traffic for the custom domain.
    primary bool
    Indicates whether this is a primary domain.
    status str
    Configuration status for the custom domain. Options include disabled, pending, pending_verification, and ready.
    tls_policy str
    TLS policy for the custom domain. Available options are: compatible or recommended. Compatible includes TLS 1.0, 1.1, 1.2, and recommended only includes TLS 1.2. Cannot be set on self_managed domains.
    type str
    Provisioning type for the custom domain. Options include auth0_managed_certs and self_managed_certs.
    verifications Sequence[GetCustomDomainVerification]
    Configuration settings for verification.
    custom_domain_id str
    The ID of the Custom Domain.
    certificates List<Property Map>
    The Custom Domain certificate.
    customClientIpHeader String
    The HTTP header to fetch the client's IP address. Cannot be set on auth0_managed domains.
    domain String
    Name of the custom domain.
    domainMetadata Map<String>
    Metadata associated with the Custom Domain. Maximum of 10 metadata properties allowed.
    id String
    The provider-assigned unique ID for this managed resource.
    originDomainName String
    Once the configuration status is ready, the DNS name of the Auth0 origin server that handles traffic for the custom domain.
    primary Boolean
    Indicates whether this is a primary domain.
    status String
    Configuration status for the custom domain. Options include disabled, pending, pending_verification, and ready.
    tlsPolicy String
    TLS policy for the custom domain. Available options are: compatible or recommended. Compatible includes TLS 1.0, 1.1, 1.2, and recommended only includes TLS 1.2. Cannot be set on self_managed domains.
    type String
    Provisioning type for the custom domain. Options include auth0_managed_certs and self_managed_certs.
    verifications List<Property Map>
    Configuration settings for verification.
    customDomainId String
    The ID of the Custom Domain.

    Supporting Types

    GetCustomDomainCertificate

    CertificateAuthority string
    Name of the certificate authority that issued the certificate.
    ErrorMsg string
    Contains the error message if the provisioning process fails.
    RenewsBefore string
    Specifies the date by which the certificate should be renewed.
    Status string
    Indicates the current state of the certificate provisioning process.
    CertificateAuthority string
    Name of the certificate authority that issued the certificate.
    ErrorMsg string
    Contains the error message if the provisioning process fails.
    RenewsBefore string
    Specifies the date by which the certificate should be renewed.
    Status string
    Indicates the current state of the certificate provisioning process.
    certificateAuthority String
    Name of the certificate authority that issued the certificate.
    errorMsg String
    Contains the error message if the provisioning process fails.
    renewsBefore String
    Specifies the date by which the certificate should be renewed.
    status String
    Indicates the current state of the certificate provisioning process.
    certificateAuthority string
    Name of the certificate authority that issued the certificate.
    errorMsg string
    Contains the error message if the provisioning process fails.
    renewsBefore string
    Specifies the date by which the certificate should be renewed.
    status string
    Indicates the current state of the certificate provisioning process.
    certificate_authority str
    Name of the certificate authority that issued the certificate.
    error_msg str
    Contains the error message if the provisioning process fails.
    renews_before str
    Specifies the date by which the certificate should be renewed.
    status str
    Indicates the current state of the certificate provisioning process.
    certificateAuthority String
    Name of the certificate authority that issued the certificate.
    errorMsg String
    Contains the error message if the provisioning process fails.
    renewsBefore String
    Specifies the date by which the certificate should be renewed.
    status String
    Indicates the current state of the certificate provisioning process.

    GetCustomDomainVerification

    ErrorMsg string
    Contains error message, if any, from the last DNS verification check.
    LastVerifiedAt string
    Indicates the last time the domain was successfully verified.
    Methods List<object>
    Defines the list of domain verification methods used.
    Status string
    Represents the current status of the domain verification process.
    ErrorMsg string
    Contains error message, if any, from the last DNS verification check.
    LastVerifiedAt string
    Indicates the last time the domain was successfully verified.
    Methods []interface{}
    Defines the list of domain verification methods used.
    Status string
    Represents the current status of the domain verification process.
    errorMsg String
    Contains error message, if any, from the last DNS verification check.
    lastVerifiedAt String
    Indicates the last time the domain was successfully verified.
    methods List<Object>
    Defines the list of domain verification methods used.
    status String
    Represents the current status of the domain verification process.
    errorMsg string
    Contains error message, if any, from the last DNS verification check.
    lastVerifiedAt string
    Indicates the last time the domain was successfully verified.
    methods any[]
    Defines the list of domain verification methods used.
    status string
    Represents the current status of the domain verification process.
    error_msg str
    Contains error message, if any, from the last DNS verification check.
    last_verified_at str
    Indicates the last time the domain was successfully verified.
    methods Sequence[Any]
    Defines the list of domain verification methods used.
    status str
    Represents the current status of the domain verification process.
    errorMsg String
    Contains error message, if any, from the last DNS verification check.
    lastVerifiedAt String
    Indicates the last time the domain was successfully verified.
    methods List<Any>
    Defines the list of domain verification methods used.
    status String
    Represents the current status of the domain verification process.

    Package Details

    Repository
    Auth0 pulumi/pulumi-auth0
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the auth0 Terraform Provider.
    auth0 logo
    Auth0 v3.27.0 published on Wednesday, Sep 10, 2025 by Pulumi