-
Notifications
You must be signed in to change notification settings - Fork 48
feat(authorization): refactor role_assignment resource and implement folder assignment #1058
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
base: main
Are you sure you want to change the base?
feat(authorization): refactor role_assignment resource and implement folder assignment #1058
Conversation
e8415a6 to
5634558
Compare
|
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
5634558 to
977ef73
Compare
|
This PR was marked as stale after 7 days of inactivity and will be closed after another 7 days of further inactivity. If this PR should be kept open, just add a comment, remove the stale label or push new commits to it. |
stackit/internal/services/authorization/testdata/resource-folder-role-assignment.tf
Show resolved
Hide resolved
stackit/internal/services/authorization/testdata/resource-project-role-assignment.tf
Show resolved
Hide resolved
Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
977ef73 to
8307a83
Compare
| return errRoleAssignmentNotFound | ||
| } | ||
|
|
||
| // Prevent creating duplicate <resource_id, role, subject> assignments. |
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.
Wrote a comment above the function to keep everyone aware working on this resource
Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
8307a83 to
cad266e
Compare
Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
9078ee6 to
2b60ff8
Compare
Description
This PR refactors
stackit_authorization_{project,folder,organization}_role_assignmentresources to align with our coding standards and adds tests for resource.go and utils.go. It also adds the capability to add role assignments to Folder.E2E Results:

Required ENV:
TF_ACC=1
TF_ACC_REGION=eu01
TF_ACC_ORGANIZATION_ID=xxxx
STACKIT_SERVICE_ACCOUNT_TOKEN=ey..
TF_ACC_TEST_PROJECT_SERVICE_ACCOUNT_EMAIL=terraform-xxxx@sa.stackit.cloud
Manual Tests:
Checklist
make fmtexamples/directory)make generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)