skip to content
wihan.dev
view as markdown
browse the clerk docs

clerk_organizations (Data Source)

All organizations of the instance, newest first.

Example Usage

terraform
# Every organization of the instance.
data "clerk_organizations" "all" {}

# Only the organizations whose id, name, or slug match the query.
data "clerk_organizations" "acme" {
  query = "acme"
}

output "organization_slugs" {
  value = [for o in data.clerk_organizations.all.organizations : o.slug]
}

Schema

Optional

  • query (String) Search text. Clerk matches it against the organization id, name, and slug. When you do not set it, the data source returns every organization.

Read-Only

Nested Schema for organizations

Read-Only:

  • admin_delete_enabled (Boolean) true when organization admins can delete the organization.
  • id (String) Organization id.
  • max_allowed_memberships (Number) Maximum members. 0 means unlimited.
  • name (String) Organization name.
  • slug (String) Organization slug.