clerk_domains (Data Source)
All domains of the instance, with the CNAME records that a production instance needs in DNS. Feed cname_targets into your DNS provider to keep the Clerk records in code.
Example Usage
data "clerk_domains" "all" {}
# The CNAME records that the primary domain needs in DNS, keyed by host.
# Feed this map into your DNS provider (for example Cloudflare) to keep the
# Clerk records in code.
locals {
primary_domain = one([
for d in data.clerk_domains.all.domains : d if !d.is_satellite
])
clerk_dns = {
for t in local.primary_domain.cname_targets : t.host => t.value
}
}
Schema
Read-Only
domains(Attributes List) Domains of the instance. (see below for nested schema)
Nested Schema for domains
Read-Only:
accounts_portal_url(String) Account Portal URL. Null for a satellite domain.cname_targets(Attributes List) CNAME records that this domain needs in DNS. Empty for a development instance. (see below for nested schema)development_origin(String) Origin of the development instance.frontend_api_url(String) Frontend API URL for this domain.id(String) Domain id.is_satellite(Boolean)truefor a satellite domain.name(String) Domain name, for exampleexample.com.proxy_url(String) Proxy URL. Null when the domain does not use a proxy.
Nested Schema for domains.cname_targets
Read-Only:
host(String) Record host, for exampleclerk.example.com.value(String) Record target, for examplefrontend-api.clerk.services.