| 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. |
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.
# 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
}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 theopenai_project_roledata source), not organization roles. At least one role is required.
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).