wihan/dev

docs /clerk / resources

markdown
browse the clerk docs

clerk_organization_domain (Resource)

A verified domain of an organization, for enrollment by email domain. Needs domains_enabled = true on clerk_instance_organization_settings.

Example Usage

# Needs domains_enabled = true on clerk_instance_organization_settings.
resource "clerk_organization_domain" "acme" {
  organization_id = clerk_organization.acme.id
  name            = "acme.com"
  enrollment_mode = "automatic_invitation"
}

Schema

Required

  • name (String) Domain name, for example example.com. A change forces a replacement.
  • organization_id (String) Organization id. A change forces a replacement.

Optional

  • enrollment_mode (String) manual_invitation, automatic_invitation, or automatic_suggestion.
  • verified (Boolean) Mark the domain verified without an email check. Clerk reports the result in verification_status, not in this field; the input is write-only.

Read-Only

  • id (String) Organization domain id (orgdmn_...).
  • verification_status (String) Verification status that Clerk reports, for example verified or unverified.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# The import id is "organization_id/domain_id".
terraform import clerk_organization_domain.acme org_2abc.../orgdmn_2abc...