Manages a StackGen project (workspace / organization). Projects group users and resources together with role-based access control.
Use sg_project_member to assign users and sg_role to create custom roles. Workspace create cannot attach governance in the same API call; use sg_governance_assignment with this project’s id after create.
# Minimal project — name must be unique in the organization (lowercase alphanumeric and hyphens).
resource "sg_project" "example" {
name = "my-team-project"
description = "Project for this team's StackGen resources."
}
# Multiple projects — typical pattern for splitting teams or environments.
resource "sg_project" "platform" {
name = "platform"
description = "Shared platform and SRE workloads."
}
resource "sg_project" "product" {
name = "product-engineering"
description = "Application teams and feature development."
}
Import an existing sg_project using its project UUID:
terraform import sg_project.example '123e4567-e89b-12d3-a456-426614174000'
description (String) Human-readable description of the project.name (String) Project name. Must contain only alphanumeric characters and hyphens. Changing this forces a new resource.created_at (String) Timestamp when this project was created (server-assigned; read-only).id (String) Unique project identifier (UUID; server-assigned).