-
Notifications
You must be signed in to change notification settings - Fork 949
Modify github_team_repository to accept team slug as well as team id #675
Description
We have a use case where we would like users to add teams to their repos, and having them being able to do so through a slug rather than an id would make the configuration more readable.
Would it be feasible to modify the github_team_repository resource to take in a team slug rather than a team id?
https://registry.terraform.io/providers/integrations/github/latest/docs/resources/team_repository
This would be a similar change to the github_branch_protection resource taking in either a Node ID or name of a repository.
I was thinking about adding a piece of logic that would try to find the team ID if the given team ID is not an integer (in which case we assume that the user has passed in a slug instead of an ID).
*There is an edge case where a user tries to add a team repository resource with a team name composed of an integer (123), in which case the provider would assume that the user passed in a team id rather than a team slug.