Open tucsolo opened 3 days ago
Hello, harbor_project_member_group handle the membership not the group itself. the creation (and deletion) of group is handle by harbor_group, but with OIDC you can't use it. i think it's not the goal of harbor_project_member_group to check if the group is still used or not, if we do this, it means for each membership deletion, the harbor provider will need to check all the projects to check if there is the group as member or not
it should be probably handle by harbor itself in the garbage collect feature
(same as #437)
Hello, thanks for the answer
I just manually ran both Garbage Collection and Garbage Collection enabling Allow garbage collection on untagged artifacts
but groups are still there.
I'm questioning then, if checking group's uselessness it's not the goal of harbor_project_member_group
and I can't "assign permissions on projects" to harbor_group
managed groups, how am I going to automate their deletion?
I worded my sentence badly, Garbage collection does not currently delete groups. But I think it should, at least for OIDC. Can you create an issue on the Harbor project if you need it ? https://github.com/goharbor/harbor/issues
You can import groups you want to delete as harbor_group resources before the deletion of the harbor_project_member_group And for next creation of harbor_project_member_group, you can create groups with terraform before you create the membership.
Hello there, hope you could help me with this - or if we can manage to work on it together
Describe the bug Given an OIDC (Keycloak) group name + permission and its linked project, the
harbor_project
and the subsequentialharbor_project_member_group
resources are correctly created, but after executing aterraform destroy
the groups are still on the Harbor. This happens with any group/project name and any group role.To Reproduce
terraform apply
and thenterraform destroy
on:Expected behavior After executing
terraform destroy
both resources should be deleted. The project is correctly deleted, the group isn't.Additional context