-
Notifications
You must be signed in to change notification settings - Fork 949
github_team is created with the Terraform user added as an extra member #527
Description
Terraform Version
Terraform v0.12.24
- provider.aws v2.59.0
- provider.github v2.8.1
Affected Resource(s)
- github_team
- (optionally) github_team_membership
Terraform Configuration Files
resource "github_team" "tftest" {
name = "tftest"
description = "Test team"
privacy = "closed"
}Debug Output
Not relevant: trivial to reproduce. Let me know otherwise, because redacting will take some effort.
Expected Behavior
Team created with no members
Actual Behavior
The user under which terraform is run is silently added as a member to the new team. This membership does not appear in the output or state file.
Steps to Reproduce
Create a new team with or without any github_team_membership entries.
Team will be created with members + terraform_user, if terraform_user is not a member.
Important Factoids
Creating the team through GitHub's Web UI (BUI) automatically adds the user creating the team as a member.
References
Presumably, this is because of:
https://github.com/google/go-github/blob/954e7c82b2994a9f418f300c3f1e147f6a51bd29/github/teams.go#L172:24
and
https://developer.github.com/v3/teams/#create-a-team
The latter states:
When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of
maintainers. For more information, see "About teams" in the GitHub Help documentation.