Files
threshold/website/content/docs/commands/roles/add-grant-scopes.mdx
T
Robert Main 18f469105c Deprecate website folder (#6212)
* Update website folder to indicate deprecation

Adds an alert banner to the top of all MDX files within `/website` to
indicate deprecation

* Update website README
2025-11-04 10:22:10 -05:00

53 lines
2.1 KiB
Plaintext

---
layout: docs
page_title: roles add-grant-scopes - Command
description: >-
The "roles add-grant-scopes" command adds grant scopes to an existing role resource.
---
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
> [!IMPORTANT]
> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com.
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
# roles add-grant-scopes
Command: `roles add-grant-scopes`
The `roles add-grant-scopes` command lets you add grant scopes to a role.
You can specify multiple grant scopes per role.
## Example
This example adds a grant to a role with the ID `r_1234567890` in the current scope and any children scopes:
```shell-session
$ boundary roles add-grant-scopes -id r_1234567890 -grant-scope-id "this" -grant-scope-id "children"
```
## Usage
<CodeBlockConfig hideClipboard>
```shell-session
$ boundary roles add-grant-scopes [options] [args]
```
</CodeBlockConfig>
### Command options
- `-grant-scope-id=<string>` - The scope IDs that inherit grants set on the role.
You can specify the following values:
- `this` - Applies to the current scope.
- `children` - Applies to all direct children of the scope and can only be used with global and org scopes.
- `descendants` - Applies to all descendants of the scope and can only be used with the global scope.
Boundary does not allow you to create redudnant grant scopes.
For example, if an org scope inherits a grant from the global scope, you cannot apply the same grant directly to the org scope.
- `-id=<string>` - The ID of the role you want to add grant scopes to.
- `-version=<int>` The version of the role to add grant scopes to.
If you do not specify a version, the command performs a check-and-set automatically.
@include 'cmd-option-note.mdx'