wihan/dev

docs /clerk / resources

markdown
browse the clerk docs

clerk_instance_settings (Resource)

General settings of the instance. This is a singleton: create adopts the instance, and destroy only removes the resource from state. Clerk does not return most of these fields, so the provider cannot detect dashboard drift on them; allowed_origins is the exception.

Example Usage

resource "clerk_instance_settings" "this" {
  test_mode     = true
  support_email = "[email protected]"

  # Origins for native apps and cross-origin requests. The provider reads
  # this list back and detects drift.
  allowed_origins = [
    "capacitor://localhost",
  ]
}

Schema

Optional

  • allowed_origins (Set of String) Allowed origins for cross-origin requests, for example native app schemes. The provider reads this list back and detects drift. Leave it unset to keep it unmanaged.
  • clerk_js_version (String) Pinned Clerk JS version for the hosted account pages. Set "" to clear the pin.
  • development_origin (String) Origin for custom redirects on development instances.
  • enhanced_email_deliverability (Boolean) Send OTP verification emails through Clerk’s shared domain via Postmark (production instances).
  • hibp (Boolean) Check passwords against the Have I Been Pwned breach list.
  • support_email (String) Support email address shown on the frontend. Set "" to clear it server-side.
  • test_mode (Boolean) Enable test mode. Clerk enables it on development instances by default.
  • url_based_session_syncing (Boolean) Use URL-based session sync instead of third-party cookies on development instances.

Read-Only

  • environment_type (String) development or production.
  • id (String) Instance id.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# Any id works; the first refresh replaces it with the real instance id.
terraform import clerk_instance_settings.this instance