getProjectMembership

The gitlab.ProjectMembership data source allows to list and filter all members of a project specified by either its id or full path.

Note exactly one of project_id or full_path must be provided. Upstream API: GitLab REST API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = gitlab.getProjectMembership({
inherited: true,
projectId: 123,
});
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.get_project_membership(inherited=True,
project_id=123)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = GitLab.GetProjectMembership.Invoke(new()
{
Inherited = true,
ProjectId = 123,
});
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v6/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.LookupProjectMembership(ctx, &gitlab.LookupProjectMembershipArgs{
Inherited: pulumi.BoolRef(true),
ProjectId: pulumi.IntRef(123),
}, nil)
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetProjectMembershipArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = GitlabFunctions.getProjectMembership(GetProjectMembershipArgs.builder()
.inherited(true)
.projectId(123)
.build());
}
}
variables:
example:
fn::invoke:
Function: gitlab:getProjectMembership
Arguments:
inherited: true
projectId: 123

Return

A collection of values returned by getProjectMembership.

Parameters

argument

A collection of arguments for invoking getProjectMembership.


suspend fun getProjectMembership(fullPath: String? = null, inherited: Boolean? = null, projectId: Int? = null, query: String? = null): GetProjectMembershipResult

Return

A collection of values returned by getProjectMembership.

Parameters

fullPath

The full path of the project.

inherited

Return all project members including members through ancestor groups

projectId

The ID of the project.

query

A query string to search for members

See also


Return

A collection of values returned by getProjectMembership.

Parameters

argument

Builder for com.pulumi.gitlab.kotlin.inputs.GetProjectMembershipPlainArgs.

See also