New resources for managing team membership #36

Merged
techknowlogick merged 16 commits from tobiasbp/terraform-provider-gitea:add-team-membership-resource into main 2023-11-16 00:52:16 +00:00
Contributor

This PR adds two new resources, gitea_team_membership & gitea_team_members, in an attempt to decouple gitea_team resources from team memberships. This facilitates the removal of members from teams without altering/recreating an existing team resource.

This PR adresses this issue: #30

The ability to set members in the gitea_team resource has been removed.

The resources proposed here are inspired by similar resources in the GitHub provider:

gitea_team_members

A single resource manages all members of a team.

  • This resource must be recreated when membership changes. This means, that other team members will temporarily loose their membership until the recreation of the resource is complete.
  • If the recreation of the resource fails, other users will have lost their membership until the resource can be recreated.

gitea_team_membership

A single resource holds the relationship between a single user and a single team.

  • Memberships can be deleted without affecting other users.
This PR adds two new resources, _gitea_team_membership_ & _gitea_team_members_, in an attempt to decouple _gitea_team_ resources from team memberships. This facilitates the removal of members from teams without altering/recreating an existing _team_ resource. This PR adresses this issue: https://gitea.com/gitea/terraform-provider-gitea/issues/30 The ability to set members in the _gitea_team_ resource has been removed. The resources proposed here are inspired by similar resources in the _GitHub_ provider: * [team_members](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_members) * [team_membership](https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_membership) # gitea_team_members A single resource manages all members of a team. - This resource must be recreated when membership changes. This means, that other team members will temporarily loose their membership until the recreation of the resource is complete. - If the recreation of the resource fails, other users will have lost their membership until the resource can be recreated. # gitea_team_membership A single resource holds the relationship between a single user and a single team. - Memberships can be deleted without affecting other users.
tobiasbp added 15 commits 2023-10-31 14:55:05 +00:00
tobiasbp requested review from techknowlogick 2023-10-31 14:59:56 +00:00
tobiasbp added 1 commit 2023-11-02 10:09:10 +00:00
Fix: Reorder of members in gitea_team_members should not trig recreation of resource
All checks were successful
Setup Terraform / Terraform Versions (pull_request) Successful in 8s
b7e9ed9266
techknowlogick approved these changes 2023-11-16 00:52:06 +00:00
techknowlogick merged commit 557ea2673a into main 2023-11-16 00:52:16 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/terraform-provider-gitea#36
No description provided.