# Reference for the teleport\_scoped\_role\_assignment Terraform data-source

This page describes the supported values of the `teleport_scoped_role_assignment` data source of the Teleport Terraform provider.

## Schema

### Required

- `metadata` (Attributes) Metadata contains the resource metadata. (see [below for nested schema](#nested-schema-for-metadata))
- `scope` (String) Scope is the scope of the role assignment resource.
- `spec` (Attributes) Spec is the role assignment specification. (see [below for nested schema](#nested-schema-for-spec))
- `sub_kind` (String) SubKind is the resource sub-kind.
- `version` (String) Version is the resource version.

### Nested Schema for `metadata`

Required:

- `name` (String) name is an object name.

Optional:

- `description` (String) description is object description.
- `expires` (String) expires is a global expiry time header can be set on any resource in the system.
- `labels` (Map of String) labels is a set of labels.

### Nested Schema for `spec`

Required:

- `assignments` (Attributes List) Assignments is a list of individual role @ scope assignments. (see [below for nested schema](#nested-schema-for-specassignments))

Optional:

- `bot_name` (String) Name of the Bot to whom all contained assignments apply. Mutually exclusive with `user`.
- `bot_scope` (String) Scope of the Bot to whom all contained assignments apply. Required if `bot_name` is set. If specified, assignment scopes must be equal or descendent of this scope.
- `user` (String) User is the user to whom all contained assignments apply. Mutually exclusive with `bot_name`.

### Nested Schema for `spec.assignments`

Optional:

- `role` (String) Roles is the name of the role that is assigned by this assignment.
- `scope` (String) Scope is the scope to which the role is assigned. This must be a member/child of the scope of the \[ScopedRoleAssignment] in which this assignment is contained.
