-
Notifications
You must be signed in to change notification settings - Fork 42
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
| } | ||
|
|
||
| // returns an error if duplicate role assignment exists | ||
| func (r *roleAssignmentResource) checkDuplicate(ctx context.Context, model Model) error { //nolint:gocritic // A read only copy is required since an api response is parsed into the model and this check should not affect the model parameter |
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.
Removed this Func. We don't need to check if a duplicate role assignment exists. This logic is handled by the API itself.
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. |
Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
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. |
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)