wihan/dev

docs /clerk / resources

markdown
browse the clerk docs

clerk_organization_membership (Resource)

One user’s membership in one organization.

Example Usage

resource "clerk_organization_membership" "wihan" {
  organization_id = clerk_organization.acme.id
  user_id         = "user_2abcDEFghiJKLmnoPQRstuVWXyz"
  role            = "org:admin"
}

Schema

Required

  • organization_id (String) Organization id. A change forces a replacement.
  • role (String) Role key of the member, for example org:admin or a custom clerk_organization_role key.
  • user_id (String) User id. A change forces a replacement.

Read-Only

  • id (String) Membership id (orgmem_...).
  • role_name (String) Display name of the role.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# The import id is "organization_id/user_id".
terraform import clerk_organization_membership.wihan org_2abc.../user_2abc...