Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Latest commit

95277a2 · Apr 14, 2025

History

History
74 lines (60 loc) · 2.17 KB

File metadata and controls

74 lines (60 loc) · 2.17 KB
page_title subcategory description
coderd_group Data Source - terraform-provider-coderd
An existing group on the Coder deployment.

coderd_group (Data Source)

An existing group on the Coder deployment.

Example Usage

// Get a group on the provider default organization by `id`
data "coderd_group" "employees" {
  id = "abcd-efg-hijk"
}

// Get a group on the provider default organization by `name` + `organization_id`
data "coderd_group" "bosses" {
  name = "bosses"
}

// Use them to apply ACL to a template
resource "coderd_template" "example" {
  name     = "example-template"
  versions = [/* ... */]
  acl = {
    groups = [
      {
        id   = data.coderd_group.employees.id
        role = "use"
      },
      {
        id   = data.coderd_group.bosses.id
        role = "admin"
      }
    ]
    users = []
  }
}

Schema

Optional

  • id (String) The ID of the group to retrieve. This field will be populated if a name and organization ID is supplied.
  • name (String) The name of the group to retrieve. This field will be populated if an ID is supplied.
  • organization_id (String) The organization ID that the group belongs to. This field will be populated if an ID is supplied. Defaults to the provider default organization ID.

Read-Only

  • avatar_url (String)
  • display_name (String)
  • members (Attributes Set) Members of the group. (see below for nested schema)
  • quota_allowance (Number) The number of quota credits to allocate to each user in the group.
  • source (String) The source of the group. Either oidc or user.

Nested Schema for members

Read-Only:

  • created_at (Number) Unix timestamp of when the member was created.
  • email (String)
  • id (String)
  • last_seen_at (Number) Unix timestamp of when the member was last seen.
  • login_type (String) The login type of the member. Can be oidc, token, password, github or none.
  • status (String) The status of the member. Can be active, dormant or suspended.
  • username (String)