-
Notifications
You must be signed in to change notification settings - Fork 2
feat(rbac): support RBAC resource restriction on rolebinding #133
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for RBAC resource restriction on rolebinding resources in the Terraform provider. It introduces a new resource_name_restriction field while deprecating the existing condition_resource_names approach.
Key changes:
- Adds new
resource_name_restrictionblock with structured fields for resource scoping - Deprecates the existing
condition_resource_namesfield in favor of the new approach - Implements parsing logic to convert between Terraform schema and API structures
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/rolebinding/main.tf | Updates example to demonstrate new resource_name_restriction usage |
| cloud/resource_rolebinding.go | Adds resource_name_restriction field and deprecates condition_resource_names |
| cloud/rbac/rbac.go | Implements parsing and schema generation for resource name restrictions |
| cloud/rbac/rbac_test.go | Adds comprehensive tests for the new RBAC parsing functionality |
| cloud/data_source_rolebinding.go | Updates data source to read resource_name_restriction field |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Motivation
Support RBAC resource restriction on rolebinding
Examples