Skip to content

Latest commit

 

History

History
52 lines (40 loc) · 1.68 KB

File metadata and controls

52 lines (40 loc) · 1.68 KB
page_title subcategory description
openai_project_group Resource - terraform-provider-openai
Manages a group's membership and roles in an OpenAI Project. This resource adds a group to a project and assigns it one or more project-level roles.

openai_project_group (Resource)

Manages a group's membership and roles in an OpenAI Project. This resource adds a group to a project and assigns it one or more project-level roles.

Example Usage

# First, create a project
resource "openai_project" "production" {
  name = "Production API"
}

# Look up project-level roles
data "openai_project_role" "member" {
  project_id = openai_project.production.id
  name       = "member"
}

# Add a group to the project with one or more roles
resource "openai_project_group" "engineering" {
  project_id = openai_project.production.id
  group_id   = var.group_id
  role_ids   = [data.openai_project_role.member.id]
}

output "group_name" {
  value = openai_project_group.engineering.group_name
}

Schema

Required

  • group_id (String) The ID of the group to add to the project.
  • project_id (String) The ID of the project.
  • role_ids (Set of String) Set of project-level role IDs to assign to the group. Must be project roles (e.g. from the openai_project_role data source), not organization roles. At least one role is required.

Read-Only

  • created_at (Number) The Unix timestamp (in seconds) when the group was added to the project.
  • group_name (String) The display name of the group.
  • id (String) The identifier of the project group (project_id:group_id).