Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for grant_scope_ids #562

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@

Canonical reference for changes, improvements, and bugfixes for the Boundary Terraform provider.

## Next

### New and Improved

* Support the multi-value `grant_scope_ids` field in the role provider
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/562))

## 1.1.13 (February 1, 2024)

### New and Improved

* Allow dynamic credentials when configuring storage buckets.
* Allow dynamic credentials when configuring storage buckets
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/549))

## 1.1.12 (January 8, 2024)
Expand Down
3 changes: 2 additions & 1 deletion docs/resources/role.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ resource "boundary_role" "readonly" {
### Optional

- `description` (String) The role description.
- `grant_scope_id` (String)
- `grant_scope_id` (String, Deprecated) For Boundary 0.15+, use `grant_scope_ids` instead. The scope for which the grants in the role should apply.
jefferai marked this conversation as resolved.
Show resolved Hide resolved
- `grant_scope_ids` (Set of String) A list of scopes for which the grants in this role should apply, which can include the special values "this", "children", or "descendants"
- `grant_strings` (Set of String) A list of stringified grants for the role.
- `name` (String) The role name. Defaults to the resource name.
- `principal_ids` (Set of String) A list of principal (user or group) IDs to add as principals on the role.
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ resource "boundary_scope" "org" {
}

resource "boundary_role" "org_admin" {
scope_id = boundary_scope.global.id
grant_scope_id = boundary_scope.org.id
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = ["u_auth"]
scope_id = boundary_scope.global.id
grant_scope_ids = [boundary_scope.org.id]
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = ["u_auth"]
}
```

Expand Down
8 changes: 4 additions & 4 deletions examples/resources/boundary_scope/role.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ resource "boundary_scope" "org" {
}

resource "boundary_role" "org_admin" {
scope_id = boundary_scope.global.id
grant_scope_id = boundary_scope.org.id
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = ["u_auth"]
scope_id = boundary_scope.global.id
grant_scope_ids = [boundary_scope.org.id]
grant_strings = ["ids=*;type=*;actions=*"]
principal_ids = ["u_auth"]
}
38 changes: 19 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ require (
github.com/hashicorp/boundary v0.15.0
github.com/hashicorp/boundary/api v0.0.45
github.com/hashicorp/boundary/sdk v0.0.42
github.com/hashicorp/cap v0.4.1
github.com/hashicorp/cap/ldap v0.0.0-20231012003312-273118a6e3b8
github.com/hashicorp/cap v0.5.0
github.com/hashicorp/cap/ldap v0.0.0-20240206183135-ed8f24513744
github.com/hashicorp/go-cty v1.4.1-0.20200723130312-85980079f637
github.com/hashicorp/go-kms-wrapping/v2 v2.0.15
github.com/hashicorp/go-kms-wrapping/v2 v2.0.16
github.com/hashicorp/go-secure-stdlib/configutil/v2 v2.0.11
github.com/hashicorp/go-secure-stdlib/parseutil v0.1.8
github.com/hashicorp/go-secure-stdlib/pluginutil/v2 v2.0.6
github.com/hashicorp/terraform-plugin-docs v0.18.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.31.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.32.0
github.com/jimlambrt/gldap v0.1.9
github.com/kr/pretty v0.3.1
github.com/mitchellh/go-homedir v1.1.0
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.18.0
mvdan.cc/gofumpt v0.5.0
golang.org/x/crypto v0.19.0
mvdan.cc/gofumpt v0.6.0
)

require (
Expand Down Expand Up @@ -108,7 +108,7 @@ require (
github.com/hashicorp/nodeenrollment v0.2.9 // indirect
github.com/hashicorp/terraform-exec v0.20.0 // indirect
github.com/hashicorp/terraform-json v0.21.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.20.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.21.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
Expand Down Expand Up @@ -181,24 +181,24 @@ require (
github.com/yuin/goldmark v1.6.0 // indirect
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zalando/go-keyring v0.2.3 // indirect
github.com/zclconf/go-cty v1.14.1 // indirect
github.com/zclconf/go-cty v1.14.2 // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.18.0 // indirect
golang.org/x/oauth2 v0.13.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.16.0 // indirect
golang.org/x/term v0.16.0 // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.14.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.17.0 // indirect
golang.org/x/term v0.17.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.14.0 // indirect
golang.org/x/tools v0.17.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect
google.golang.org/grpc v1.60.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect
google.golang.org/grpc v1.61.0 // indirect
google.golang.org/protobuf v1.32.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/driver/postgres v1.5.4 // indirect
Expand Down
Loading
Loading