You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
github_team is created with the Terraform user added as an extra member #527
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.
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.
Reacted by shakerky-awx, Onur Gokkocabas, Nikola Knežević, Bas van Dijk, sfdc-afraley, Chris Knowles, Bouke van der Bijl, Kevin Behrens, leowmjw and Dylan Scholz
This is especially confusing when you're testing with your account and creating teams where you yourself are a member. It adds you as a maintainer, but then a second terraform run will want to change your role. For example:
Still relevant with
Terraform 0.13.5
provider.github 2.9.2
For context: This would simplify things for me as we're using teams and CODEOWNERS for some approval workflows, and the service account that creates the team shouldn't be able to approve things.
Ah, that's a good idea! Read it too late though and merged the workaround instead 🙃 . Seems like the right fix though and we can aim to get that option added in a future release.
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
👋 Hey Friends, this issue has been automatically marked as stale because it has no recent activity. It will be closed if no further activity occurs. Please add the Status: Pinned label if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!
Activity
sfdc-afraley commentedon Sep 15, 2020
This is especially confusing when you're testing with your account and creating teams where you yourself are a member. It adds you as a maintainer, but then a second terraform run will want to change your role. For example:
Second TF apply:
thekbb commentedon Dec 16, 2020
Still relevant with
Terraform
0.13.5provider.github
2.9.2For context: This would simplify things for me as we're using teams and
CODEOWNERSfor some approval workflows, and the service account that creates the team shouldn't be able to approve things.Add `create_default_maintainer` option to `github_team`
Add `create_default_maintainer` option to `github_team`
Add `create_default_maintainer` Option To `github_team` (#661)
jcudit commentedon Feb 5, 2021
Ah, that's a good idea! Read it too late though and merged the workaround instead 🙃 . Seems like the right fix though and we can aim to get that option added in a future release.
Merge in upstream changes (#1)
Add `create_default_maintainer` Option To `github_team` (integrations…
github-actions commentedon Dec 8, 2022
👋 Hey Friends, this issue has been automatically marked as
stalebecause it has no recent activity. It will be closed if no further activity occurs. Please add theStatus: Pinnedlabel if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!github-actions commentedon Apr 24, 2024
👋 Hey Friends, this issue has been automatically marked as
stalebecause it has no recent activity. It will be closed if no further activity occurs. Please add theStatus: Pinnedlabel if you feel that this issue needs to remain open/active. Thank you for your contributions and help in keeping things tidy!