The gitlab_project_membership
data source allows to list and filter all members of a project specified by either its id or full path.
Upstream API: GitLab REST API docs
# By project's ID
data "gitlab_project_membership" "example" {
project_id = 123
}
# By project's full path
data "gitlab_project_membership" "example" {
full_path = "foo/bar"
}
# Get members of a project including all members
# through ancestor groups
data "gitlab_project_membership" "example" {
project_id = 123
inherited = true
}
full_path
(String) The full path of the project.inherited
(Boolean) Return all project members including members through ancestor groupsproject_id
(Number) The ID of the project.query
(String) A query string to search for membersid
(String) The ID of this resource.members
(List of Object) The list of project members. (see below for nested schema)members
Read-Only:
access_level
(String)avatar_url
(String)expires_at
(String)id
(Number)name
(String)state
(String)username
(String)web_url
(String)