terraform-provider-stackgen

sg_roles (Data Source)

Lists all available roles (built-in and custom). Use this to look up role IDs for sg_project_member assignments.

Example Usage

data "sg_roles" "all" {}

output "admin_role_id" {
  value = one([for r in data.sg_roles.all.roles : r.id if r.name == "admin"])
}

Schema

Read-Only

Nested Schema for roles

Read-Only: