wihan/dev

docs /clerk / resources

markdown
browse the clerk docs

clerk_organization (Resource)

An organization of the instance. The organizations feature must be on (see clerk_instance_organization_settings).

Example Usage

resource "clerk_organization" "acme" {
  name                    = "Acme"
  slug                    = "acme"
  max_allowed_memberships = 25

  public_metadata = jsonencode({
    tier = "enterprise"
  })
}

Schema

Required

  • name (String) Organization name.

Optional

  • admin_delete_enabled (Boolean) Allow organization admins to delete the organization.
  • created_by (String) User id of the creator. Create-only: a change forces a replacement. When set, Clerk adds this user as the first admin member.
  • max_allowed_memberships (Number) Maximum members. 0 means unlimited.
  • private_metadata (String) JSON object, visible to the backend only.
  • public_metadata (String) JSON object, visible to the frontend.
  • slug (String) URL-safe slug. Clerk derives one from the name when unset.

Read-Only

  • id (String) Organization id (org_...).

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

terraform import clerk_organization.acme org_2abcDEFghiJKLmnoPQRstuVWXyz