Skip to content

Latest commit

 

History

History
108 lines (80 loc) · 3.35 KB

File metadata and controls

108 lines (80 loc) · 3.35 KB
page_title coderd_organization Resource - terraform-provider-coderd
subcategory
description An organization on the Coder deployment. ~> Warning This resource is only compatible with Coder version 2.16.0 https://github.com/coder/coder/releases/tag/v2.16.0 and later.

coderd_organization (Resource)

An organization on the Coder deployment.

~> Warning This resource is only compatible with Coder version 2.16.0 and later.

Example Usage

resource "coderd_organization" "blueberry" {
  name         = "blueberry"
  display_name = "Blueberry"
  description  = "The organization for blueberries"
  icon         = "/emojis/1fad0.png"

  org_sync_idp_groups = [
    "wibble",
    "wobble",
  ]

  group_sync {
    field = "coder_groups"
    mapping = {
      toast = [coderd_group.bread.id]
    }
  }

  role_sync {
    field = "coder_roles"
    mapping = {
      manager = ["organization-user-admin"]
    }
  }
}

Schema

Required

  • name (String) Name of the organization.

Optional

  • description (String)
  • display_name (String) Display name of the organization. Defaults to name.
  • group_sync (Block, Optional, Deprecated) Group sync settings to sync groups from an IdP.

~> Deprecated This block is deprecated. Use the coderd_organization_group_sync resource instead. (see below for nested schema)

  • icon (String)
  • org_sync_idp_groups (Set of String) Claims from the IdP provider that will give users access to this organization.
  • role_sync (Block, Optional) Role sync settings to sync organization roles from an IdP. (see below for nested schema)
  • workspace_sharing (String) Workspace sharing setting for the organization. Valid values are everyone and none. Requires a Coder Deployment running v2.32.0 or later.

Read-Only

  • id (String) Organization ID

Nested Schema for group_sync

Optional:

  • auto_create_missing (Boolean) Controls whether groups will be created if they are missing.
  • field (String) The claim field that specifies what groups a user should be in.
  • mapping (Map of List of String) A map from OIDC group name to Coder group ID.
  • regex_filter (String) A regular expression that will be used to filter the groups returned by the OIDC provider. Any group not matched will be ignored.

Nested Schema for role_sync

Optional:

  • field (String) The claim field that specifies what organization roles a user should be given.
  • mapping (Map of List of String) A map from OIDC group name to Coder organization role.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# The ID supplied can be either a organization UUID retrieved via the API
# or the name of the organization.
$ terraform import coderd_organization.our_org our-org

Alternatively, in Terraform v1.5.0 and later, an import block can be used:

import {
  to = coderd_organization.our_org
  id = "our-org"
}