api: remove deprecated grant_scope_id field (#4886)

* api: remove deprecated grant_scope_id field

The grant_scope_id field was deprecated in 0.15.0, so we can remove
it for 0.17.0.

* Fix tests

* Fix more tests

* Remove an option and some related code that stuck around

* Fix bats tests

---------

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
This commit is contained in:
Johan Brandhorst-SatzkornandJeff Mitchell authored and GitHub committed 2024-06-17 12:09:33 -07:00
1 parent d547e0d459
commit c6f3c375f3
21 files changed
+107 -297

No files matched your search

@@ -32,12 +32,9 @@ $ boundary roles create [options] [args]
### Command options
- `-description=<string>` - The description to assign to the role.
- `-grant-scope-id=<string>` - The scope ID for any grants set on the role.
The `grant-scope-id` field is now deprecated in favor of multiple grant scope support using [add-grant-scopes](/boundary/docs/commands/roles/add-grant-scopes).
For more information, refer to [Version 0.15.0 feature deprecations and EOL](/boundary/docs/release-notes/v0_15_0#feature-deprecations-and-eol).
- `-name=<string>` - The name to assign to the role.
- `-scope-id=<string>` - The scope in which you want to create the role.
The default is `global`.
You can also specify the scope using the **BOUNDARY_SCOPE_ID** environment variable.
@include 'cmd-option-note.mdx'
@include 'cmd-option-note.mdx'
@@ -32,12 +32,9 @@ $ boundary roles update [options] [args]
### Command options
- `-description=<string>` - The description to set on the role.
- `-grant-scope-id=<string>` - The scope ID for any grants set on the role.
The `grant-scope-id` field is now deprecated in favor of multiple grant scope support using [add-grant-scopes](/boundary/docs/commands/roles/add-grant-scopes).
For more information, refer to [Version 0.15.0 feature deprecations and EOL](/boundary/docs/release-notes/v0_15_0#feature-deprecations-and-eol).
- `-id=<string>` - The ID of the role you want to update.
- `-name=<string>` - The name to set on the role.
- `-version=<int>` - The version of the role you want to update.
If you do not specify a version, the command performs a check-and-set automatically.
@include 'cmd-option-note.mdx'
@include 'cmd-option-note.mdx'
@@ -378,7 +378,10 @@ Assumes recovery key export from above steps is still set:
```shell-session
$ boundary roles create -name 'org_admin' \
-recovery-config /tmp/recovery.hcl \
-scope-id 'global' \
-scope-id 'global'
$ boundary roles set-grant-scopes \
-id <org_admin_id> \
-grant-scope-id <org_scope_id>
$ boundary roles add-grants -id <org_admin_id> \
@@ -397,7 +400,7 @@ $ boundary roles add-principals -id <org_admin_id> \
```hcl
resource "boundary_role" "org_admin" {
scope_id = "global"
grant_scope_id = boundary_scope.org.id
grant_scope_ids = [boundary_scope.org.id]
grant_strings = [
"ids=*;type=*;actions=*"
]
@@ -438,8 +441,8 @@ $ boundary roles add-principals -id <project_admin_id> \
```hcl
resource "boundary_role" "project_admin" {
scope_id = boundary_scope.org.id
grant_scope_id = boundary_scope.project.id
scope_id = boundary_scope.org.id
grant_scope_ids = [boundary_scope.project.id]
grant_strings = [
"ids=*;type=*;actions=*"
]