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
[FEAT]: github_membership invite using the email address #2197
Would it be possible to have a membership invite to an organisation for someone that does not have a github account yet? It will let people run the tf provider without waiting for the end user to create their github account.
Hey @nitang22 thanks for bringing this up. Let us know if you'd be interested in tackling this feature and submitting a PR. For now I have labeled this as "Up For Grabs" so that the community can take a stab at getting this out there as well. ❤️
👋 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!
I'm facing a similar challenge. In my case I want to set some users as org admins. I was sourcing those from an existing GitHub team which was populated via Team Sync, but, alas, Team Sync is not reliable and syncs group members at random intervals, meaning I need to run Terraform a second time after adding updating the group membership in my IDP.
I started looking into this and noticed the resource is using EditOrgMembership and not CreateOrgInvitation. Looking at this, we should check if that user is a member of that org and then use EditOrgMembership, otherwise allow inviting using EditOrgMembership with either GitHub handle or email address, but wanted to check in here before picking this up...
👋 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!
Just to weigh in here, I believe this is a really important feature that the provider should support.
One thing that my team and I have seen when managing users is that sometimes you think when you're searching somebody's name that you found the correct user, but it's possible in that scenario that you end up inviting the wrong person because you get the wrong GitHub handle for them. And if we explicitly required (or at least allowed) email address here, then we can be confident that we are going to be inviting the correct user to an organization.
We just had this happen for one of our client organizations where we almost invited the wrong person of a similar name to the client's org. Luckily, we caught it before that was a problem, but I would love to have this feature added so that type of thing isn't possible going forward. This type of thing feels like it's a security trap that an organization could easily fall into.
I've opened #3661 implementing this: it adds an email argument to github_membership itself (rather than a new resource, see the discussion in #3464), using the organization invitation API. Review feedback welcome.
A status update for anyone following this issue: #3661 (which adds email to github_membership directly, as requested here) was closed as a duplicate of #3229. Note that #3229 takes a different approach (a new github_organization_invitation resource), has been inactive since its review in February, and predates the docs migration, while #3464 is currently a draft. So as of today there is no active PR moving this issue forward.
@deiga could you share which direction the team actually wants for this feature? I am motivated to drive #3661 through review and will address feedback quickly, or I can help with #3229 if the separate-resource approach is the preferred one. A clear signal would help contributors stop producing PRs that end up stalled or closed.
Activity
nickfloyd commentedon Mar 15, 2024
Hey @nitang22 thanks for bringing this up. Let us know if you'd be interested in tackling this feature and submitting a PR. For now I have labeled this as "Up For Grabs" so that the community can take a stab at getting this out there as well. ❤️
github-actions commentedon Dec 11, 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!shoekstra commentedon Dec 15, 2024
I'm facing a similar challenge. In my case I want to set some users as org admins. I was sourcing those from an existing GitHub team which was populated via Team Sync, but, alas, Team Sync is not reliable and syncs group members at random intervals, meaning I need to run Terraform a second time after adding updating the group membership in my IDP.
I started looking into this and noticed the resource is using EditOrgMembership and not CreateOrgInvitation. Looking at this, we should check if that user is a member of that org and then use
EditOrgMembership, otherwise allow inviting usingEditOrgMembershipwith either GitHub handle or email address, but wanted to check in here before picking this up...tkatrichenko commentedon Apr 9, 2025
It would be nice to have.
I think the API for this feature is https://docs.github.com/en/rest/orgs/members?apiVersion=2022-11-28#create-an-organization-invitation
github-actions commentedon Jan 5, 2026
👋 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!Gowiem commentedon Feb 12, 2026
Just to weigh in here, I believe this is a really important feature that the provider should support.
One thing that my team and I have seen when managing users is that sometimes you think when you're searching somebody's name that you found the correct user, but it's possible in that scenario that you end up inviting the wrong person because you get the wrong GitHub handle for them. And if we explicitly required (or at least allowed) email address here, then we can be confident that we are going to be inviting the correct user to an organization.
We just had this happen for one of our client organizations where we almost invited the wrong person of a similar name to the client's org. Luckily, we caught it before that was a problem, but I would love to have this feature added so that type of thing isn't possible going forward. This type of thing feels like it's a security trap that an organization could easily fall into.
deiga commentedon Feb 12, 2026
@Gowiem Thanks for the input!
Would you be willing to contribute a PR to enable this functionality? :)
kazuki-hanai commentedon Oct 5, 2026
I've opened #3661 implementing this: it adds an
emailargument togithub_membershipitself (rather than a new resource, see the discussion in #3464), using the organization invitation API. Review feedback welcome.kazuki-hanai commentedon Oct 14, 2026
A status update for anyone following this issue: #3661 (which adds
emailtogithub_membershipdirectly, as requested here) was closed as a duplicate of #3229. Note that #3229 takes a different approach (a newgithub_organization_invitationresource), has been inactive since its review in February, and predates the docs migration, while #3464 is currently a draft. So as of today there is no active PR moving this issue forward.@deiga could you share which direction the team actually wants for this feature? I am motivated to drive #3661 through review and will address feedback quickly, or I can help with #3229 if the separate-resource approach is the preferred one. A clear signal would help contributors stop producing PRs that end up stalled or closed.