With Auth0, you can use a custom domain to maintain a consistent user experience. This resource allows you to create and manage a custom domain within your Auth0 tenant.
resource "auth0_custom_domain" "my_custom_domain" {
domain = "auth.example.com"
type = "auth0_managed_certs"
}
domain
(String) Name of the custom domain.type
(String) Provisioning type for the custom domain. Options include auth0_managed_certs
and self_managed_certs
.custom_client_ip_header
(String) The HTTP header to fetch the client's IP address. Cannot be set on auth0_managed domains.tls_policy
(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.id
(String) The ID of this resource.origin_domain_name
(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
.verification
(List of Object) Configuration settings for verification. (see below for nested schema)verification
Read-Only:
methods
(List of Map of String)Import is supported using the following syntax:
# Custom domains can be imported using their ID.
#
# You can find existing custom domain IDs using the Auth0 Management API.
# https://auth0.com/docs/api/management/v2#!/Custom_Domains/get_custom_domains
#
# Example:
terraform import auth0_custom_domain.my_custom_domain "cd_XXXXXXXXXXXXXXXX"