ProjectMembership

class ProjectMembership : KotlinCustomResource

The gitlab.ProjectMembership resource allows to manage the lifecycle of a users project membersip.

If a project should grant membership to an entire group use the gitlab.ProjectShareGroup resource instead. Upstream API: GitLab REST API docs

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.ProjectMembership;
import com.pulumi.gitlab.ProjectMembershipArgs;
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) {
var test = new ProjectMembership("test", ProjectMembershipArgs.builder()
.accessLevel("guest")
.projectId("12345")
.userId(1337)
.build());
var example = new ProjectMembership("example", ProjectMembershipArgs.builder()
.accessLevel("guest")
.expiresAt("2022-12-31")
.projectId("67890")
.userId(1234)
.build());
}
}

Import

GitLab project membership can be imported using an id made up of project_id:user_id, e.g.

$ pulumi import gitlab:index/projectMembership:ProjectMembership test "12345:1337"

Properties

Link copied to clipboard
val accessLevel: Output<String>

The access level for the member. Valid values are: no one, minimal, guest, reporter, developer, maintainer, owner, master

Link copied to clipboard
val expiresAt: Output<String>?

Expiration date for the project membership. Format: YYYY-MM-DD

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val projectId: Output<String>

The id of the project.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val userId: Output<Int>

The id of the user.