Use this data source to find out if a user is a member of your organization, as well as what role they have within it. If the user's membership in the organization is pending their acceptance of an invite, the role they would have once they accept will be returned.
data "github_membership" "membership_for_some_user" {
username = "SomeUser"
}
username
- (Required) The username to lookup in the organization.
organization
- (Optional) The organization to check for the above username.
username
- The username.role
- admin
or member
-- the role the user has within the organization.etag
- An etag representing the membership object.state
- active
or pending
-- the state of membership within the organization. active
if the member has accepted the invite, or pending
if the invite is still pending.