gitlab logo
GitLab v4.9.0, Oct 24 22

gitlab.getProjects

The gitlab.getProjects data source allows details of multiple projects to be retrieved. Optionally filtered by the set attributes.

This data source supports all available filters exposed by the xanzy/go-gitlab package, which might not expose all available filters exposed by the Gitlab APIs.

The owner sub-attributes are only populated if the Gitlab token used has an administrator scope.

Upstream API: GitLab REST API docs

Example Usage

using System.Collections.Generic;
using Pulumi;
using GitLab = Pulumi.GitLab;

return await Deployment.RunAsync(() => 
{
    var mygroup = GitLab.GetGroup.Invoke(new()
    {
        FullPath = "mygroup",
    });

    var groupProjects = GitLab.GetProjects.Invoke(new()
    {
        GroupId = mygroup.Apply(getGroupResult => getGroupResult.Id),
        OrderBy = "name",
        IncludeSubgroups = true,
        WithShared = false,
    });

    var projects = GitLab.GetProjects.Invoke(new()
    {
        Search = "postgresql",
        Visibility = "private",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gitlab/sdk/v4/go/gitlab"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		mygroup, err := gitlab.LookupGroup(ctx, &GetGroupArgs{
			FullPath: pulumi.StringRef("mygroup"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = gitlab.GetProjects(ctx, &GetProjectsArgs{
			GroupId:          pulumi.IntRef(mygroup.Id),
			OrderBy:          pulumi.StringRef("name"),
			IncludeSubgroups: pulumi.BoolRef(true),
			WithShared:       pulumi.BoolRef(false),
		}, nil)
		if err != nil {
			return err
		}
		_, err = gitlab.GetProjects(ctx, &GetProjectsArgs{
			Search:     pulumi.StringRef("postgresql"),
			Visibility: pulumi.StringRef("private"),
		}, 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.GetGroupArgs;
import com.pulumi.gitlab.inputs.GetProjectsArgs;
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 mygroup = GitlabFunctions.getGroup(GetGroupArgs.builder()
            .fullPath("mygroup")
            .build());

        final var groupProjects = GitlabFunctions.getProjects(GetProjectsArgs.builder()
            .groupId(mygroup.applyValue(getGroupResult -> getGroupResult.id()))
            .orderBy("name")
            .includeSubgroups(true)
            .withShared(false)
            .build());

        final var projects = GitlabFunctions.getProjects(GetProjectsArgs.builder()
            .search("postgresql")
            .visibility("private")
            .build());

    }
}
import pulumi
import pulumi_gitlab as gitlab

mygroup = gitlab.get_group(full_path="mygroup")
group_projects = gitlab.get_projects(group_id=mygroup.id,
    order_by="name",
    include_subgroups=True,
    with_shared=False)
projects = gitlab.get_projects(search="postgresql",
    visibility="private")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const mygroup = gitlab.getGroup({
    fullPath: "mygroup",
});
const groupProjects = mygroup.then(mygroup => gitlab.getProjects({
    groupId: mygroup.id,
    orderBy: "name",
    includeSubgroups: true,
    withShared: false,
}));
const projects = gitlab.getProjects({
    search: "postgresql",
    visibility: "private",
});
variables:
  mygroup:
    fn::invoke:
      Function: gitlab:getGroup
      Arguments:
        fullPath: mygroup
  groupProjects:
    fn::invoke:
      Function: gitlab:getProjects
      Arguments:
        groupId: ${mygroup.id}
        orderBy: name
        includeSubgroups: true
        withShared: false
  projects:
    fn::invoke:
      Function: gitlab:getProjects
      Arguments:
        search: postgresql
        visibility: private

Using getProjects

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getProjects(args: GetProjectsArgs, opts?: InvokeOptions): Promise<GetProjectsResult>
function getProjectsOutput(args: GetProjectsOutputArgs, opts?: InvokeOptions): Output<GetProjectsResult>
def get_projects(archived: Optional[bool] = None,
                 group_id: Optional[int] = None,
                 include_subgroups: Optional[bool] = None,
                 max_queryable_pages: Optional[int] = None,
                 membership: Optional[bool] = None,
                 min_access_level: Optional[int] = None,
                 order_by: Optional[str] = None,
                 owned: Optional[bool] = None,
                 page: Optional[int] = None,
                 per_page: Optional[int] = None,
                 search: Optional[str] = None,
                 simple: Optional[bool] = None,
                 sort: Optional[str] = None,
                 starred: Optional[bool] = None,
                 statistics: Optional[bool] = None,
                 visibility: Optional[str] = None,
                 with_custom_attributes: Optional[bool] = None,
                 with_issues_enabled: Optional[bool] = None,
                 with_merge_requests_enabled: Optional[bool] = None,
                 with_programming_language: Optional[str] = None,
                 with_shared: Optional[bool] = None,
                 opts: Optional[InvokeOptions] = None) -> GetProjectsResult
def get_projects_output(archived: Optional[pulumi.Input[bool]] = None,
                 group_id: Optional[pulumi.Input[int]] = None,
                 include_subgroups: Optional[pulumi.Input[bool]] = None,
                 max_queryable_pages: Optional[pulumi.Input[int]] = None,
                 membership: Optional[pulumi.Input[bool]] = None,
                 min_access_level: Optional[pulumi.Input[int]] = None,
                 order_by: Optional[pulumi.Input[str]] = None,
                 owned: Optional[pulumi.Input[bool]] = None,
                 page: Optional[pulumi.Input[int]] = None,
                 per_page: Optional[pulumi.Input[int]] = None,
                 search: Optional[pulumi.Input[str]] = None,
                 simple: Optional[pulumi.Input[bool]] = None,
                 sort: Optional[pulumi.Input[str]] = None,
                 starred: Optional[pulumi.Input[bool]] = None,
                 statistics: Optional[pulumi.Input[bool]] = None,
                 visibility: Optional[pulumi.Input[str]] = None,
                 with_custom_attributes: Optional[pulumi.Input[bool]] = None,
                 with_issues_enabled: Optional[pulumi.Input[bool]] = None,
                 with_merge_requests_enabled: Optional[pulumi.Input[bool]] = None,
                 with_programming_language: Optional[pulumi.Input[str]] = None,
                 with_shared: Optional[pulumi.Input[bool]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetProjectsResult]
func GetProjects(ctx *Context, args *GetProjectsArgs, opts ...InvokeOption) (*GetProjectsResult, error)
func GetProjectsOutput(ctx *Context, args *GetProjectsOutputArgs, opts ...InvokeOption) GetProjectsResultOutput

> Note: This function is named GetProjects in the Go SDK.

public static class GetProjects 
{
    public static Task<GetProjectsResult> InvokeAsync(GetProjectsArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectsResult> Invoke(GetProjectsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProjectsResult> getProjects(GetProjectsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: gitlab:index/getProjects:getProjects
  arguments:
    # arguments dictionary

The following arguments are supported:

Archived bool

Limit by archived status.

GroupId int

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

IncludeSubgroups bool

Include projects in subgroups of this group. Default is false. Needs group_id.

MaxQueryablePages int

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

Membership bool

Limit by projects that the current user is a member of.

MinAccessLevel int

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

OrderBy string

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

Owned bool

Limit by projects owned by the current user.

Page int

The first page to begin the query on.

PerPage int

The number of results to return per page.

Search string

Return list of authorized projects matching the search criteria.

Simple bool

Return only the ID, URL, name, and path of each project.

Sort string

Return projects sorted in asc or desc order. Default is desc.

Starred bool

Limit by projects starred by the current user.

Statistics bool

Include project statistics. Cannot be used with group_id.

Visibility string

Limit by visibility public, internal, or private.

WithCustomAttributes bool

Include custom attributes in response (admins only).

WithIssuesEnabled bool

Limit by projects with issues feature enabled. Default is false.

WithMergeRequestsEnabled bool

Limit by projects with merge requests feature enabled. Default is false.

WithProgrammingLanguage string

Limit by projects which use the given programming language. Cannot be used with group_id.

WithShared bool

Include projects shared to this group. Default is true. Needs group_id.

Archived bool

Limit by archived status.

GroupId int

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

IncludeSubgroups bool

Include projects in subgroups of this group. Default is false. Needs group_id.

MaxQueryablePages int

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

Membership bool

Limit by projects that the current user is a member of.

MinAccessLevel int

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

OrderBy string

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

Owned bool

Limit by projects owned by the current user.

Page int

The first page to begin the query on.

PerPage int

The number of results to return per page.

Search string

Return list of authorized projects matching the search criteria.

Simple bool

Return only the ID, URL, name, and path of each project.

Sort string

Return projects sorted in asc or desc order. Default is desc.

Starred bool

Limit by projects starred by the current user.

Statistics bool

Include project statistics. Cannot be used with group_id.

Visibility string

Limit by visibility public, internal, or private.

WithCustomAttributes bool

Include custom attributes in response (admins only).

WithIssuesEnabled bool

Limit by projects with issues feature enabled. Default is false.

WithMergeRequestsEnabled bool

Limit by projects with merge requests feature enabled. Default is false.

WithProgrammingLanguage string

Limit by projects which use the given programming language. Cannot be used with group_id.

WithShared bool

Include projects shared to this group. Default is true. Needs group_id.

archived Boolean

Limit by archived status.

groupId Integer

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

includeSubgroups Boolean

Include projects in subgroups of this group. Default is false. Needs group_id.

maxQueryablePages Integer

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

membership Boolean

Limit by projects that the current user is a member of.

minAccessLevel Integer

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

orderBy String

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

owned Boolean

Limit by projects owned by the current user.

page Integer

The first page to begin the query on.

perPage Integer

The number of results to return per page.

search String

Return list of authorized projects matching the search criteria.

simple Boolean

Return only the ID, URL, name, and path of each project.

sort String

Return projects sorted in asc or desc order. Default is desc.

starred Boolean

Limit by projects starred by the current user.

statistics Boolean

Include project statistics. Cannot be used with group_id.

visibility String

Limit by visibility public, internal, or private.

withCustomAttributes Boolean

Include custom attributes in response (admins only).

withIssuesEnabled Boolean

Limit by projects with issues feature enabled. Default is false.

withMergeRequestsEnabled Boolean

Limit by projects with merge requests feature enabled. Default is false.

withProgrammingLanguage String

Limit by projects which use the given programming language. Cannot be used with group_id.

withShared Boolean

Include projects shared to this group. Default is true. Needs group_id.

archived boolean

Limit by archived status.

groupId number

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

includeSubgroups boolean

Include projects in subgroups of this group. Default is false. Needs group_id.

maxQueryablePages number

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

membership boolean

Limit by projects that the current user is a member of.

minAccessLevel number

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

orderBy string

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

owned boolean

Limit by projects owned by the current user.

page number

The first page to begin the query on.

perPage number

The number of results to return per page.

search string

Return list of authorized projects matching the search criteria.

simple boolean

Return only the ID, URL, name, and path of each project.

sort string

Return projects sorted in asc or desc order. Default is desc.

starred boolean

Limit by projects starred by the current user.

statistics boolean

Include project statistics. Cannot be used with group_id.

visibility string

Limit by visibility public, internal, or private.

withCustomAttributes boolean

Include custom attributes in response (admins only).

withIssuesEnabled boolean

Limit by projects with issues feature enabled. Default is false.

withMergeRequestsEnabled boolean

Limit by projects with merge requests feature enabled. Default is false.

withProgrammingLanguage string

Limit by projects which use the given programming language. Cannot be used with group_id.

withShared boolean

Include projects shared to this group. Default is true. Needs group_id.

archived bool

Limit by archived status.

group_id int

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

include_subgroups bool

Include projects in subgroups of this group. Default is false. Needs group_id.

max_queryable_pages int

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

membership bool

Limit by projects that the current user is a member of.

min_access_level int

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

order_by str

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

owned bool

Limit by projects owned by the current user.

page int

The first page to begin the query on.

per_page int

The number of results to return per page.

search str

Return list of authorized projects matching the search criteria.

simple bool

Return only the ID, URL, name, and path of each project.

sort str

Return projects sorted in asc or desc order. Default is desc.

starred bool

Limit by projects starred by the current user.

statistics bool

Include project statistics. Cannot be used with group_id.

visibility str

Limit by visibility public, internal, or private.

with_custom_attributes bool

Include custom attributes in response (admins only).

with_issues_enabled bool

Limit by projects with issues feature enabled. Default is false.

with_merge_requests_enabled bool

Limit by projects with merge requests feature enabled. Default is false.

with_programming_language str

Limit by projects which use the given programming language. Cannot be used with group_id.

with_shared bool

Include projects shared to this group. Default is true. Needs group_id.

archived Boolean

Limit by archived status.

groupId Number

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

includeSubgroups Boolean

Include projects in subgroups of this group. Default is false. Needs group_id.

maxQueryablePages Number

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

membership Boolean

Limit by projects that the current user is a member of.

minAccessLevel Number

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

orderBy String

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

owned Boolean

Limit by projects owned by the current user.

page Number

The first page to begin the query on.

perPage Number

The number of results to return per page.

search String

Return list of authorized projects matching the search criteria.

simple Boolean

Return only the ID, URL, name, and path of each project.

sort String

Return projects sorted in asc or desc order. Default is desc.

starred Boolean

Limit by projects starred by the current user.

statistics Boolean

Include project statistics. Cannot be used with group_id.

visibility String

Limit by visibility public, internal, or private.

withCustomAttributes Boolean

Include custom attributes in response (admins only).

withIssuesEnabled Boolean

Limit by projects with issues feature enabled. Default is false.

withMergeRequestsEnabled Boolean

Limit by projects with merge requests feature enabled. Default is false.

withProgrammingLanguage String

Limit by projects which use the given programming language. Cannot be used with group_id.

withShared Boolean

Include projects shared to this group. Default is true. Needs group_id.

getProjects Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Projects List<Pulumi.GitLab.Outputs.GetProjectsProject>

A list containing the projects matching the supplied arguments

Archived bool

Limit by archived status.

GroupId int

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

IncludeSubgroups bool

Include projects in subgroups of this group. Default is false. Needs group_id.

MaxQueryablePages int

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

Membership bool

Limit by projects that the current user is a member of.

MinAccessLevel int

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

OrderBy string

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

Owned bool

Limit by projects owned by the current user.

Page int

The first page to begin the query on.

PerPage int

The number of results to return per page.

Search string

Return list of authorized projects matching the search criteria.

Simple bool

Return only the ID, URL, name, and path of each project.

Sort string

Return projects sorted in asc or desc order. Default is desc.

Starred bool

Limit by projects starred by the current user.

Statistics bool

Include project statistics. Cannot be used with group_id.

Visibility string

Limit by visibility public, internal, or private.

WithCustomAttributes bool

Include custom attributes in response (admins only).

WithIssuesEnabled bool

Limit by projects with issues feature enabled. Default is false.

WithMergeRequestsEnabled bool

Limit by projects with merge requests feature enabled. Default is false.

WithProgrammingLanguage string

Limit by projects which use the given programming language. Cannot be used with group_id.

WithShared bool

Include projects shared to this group. Default is true. Needs group_id.

Id string

The provider-assigned unique ID for this managed resource.

Projects []GetProjectsProject

A list containing the projects matching the supplied arguments

Archived bool

Limit by archived status.

GroupId int

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

IncludeSubgroups bool

Include projects in subgroups of this group. Default is false. Needs group_id.

MaxQueryablePages int

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

Membership bool

Limit by projects that the current user is a member of.

MinAccessLevel int

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

OrderBy string

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

Owned bool

Limit by projects owned by the current user.

Page int

The first page to begin the query on.

PerPage int

The number of results to return per page.

Search string

Return list of authorized projects matching the search criteria.

Simple bool

Return only the ID, URL, name, and path of each project.

Sort string

Return projects sorted in asc or desc order. Default is desc.

Starred bool

Limit by projects starred by the current user.

Statistics bool

Include project statistics. Cannot be used with group_id.

Visibility string

Limit by visibility public, internal, or private.

WithCustomAttributes bool

Include custom attributes in response (admins only).

WithIssuesEnabled bool

Limit by projects with issues feature enabled. Default is false.

WithMergeRequestsEnabled bool

Limit by projects with merge requests feature enabled. Default is false.

WithProgrammingLanguage string

Limit by projects which use the given programming language. Cannot be used with group_id.

WithShared bool

Include projects shared to this group. Default is true. Needs group_id.

id String

The provider-assigned unique ID for this managed resource.

projects List<GetProjectsProject>

A list containing the projects matching the supplied arguments

archived Boolean

Limit by archived status.

groupId Integer

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

includeSubgroups Boolean

Include projects in subgroups of this group. Default is false. Needs group_id.

maxQueryablePages Integer

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

membership Boolean

Limit by projects that the current user is a member of.

minAccessLevel Integer

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

orderBy String

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

owned Boolean

Limit by projects owned by the current user.

page Integer

The first page to begin the query on.

perPage Integer

The number of results to return per page.

search String

Return list of authorized projects matching the search criteria.

simple Boolean

Return only the ID, URL, name, and path of each project.

sort String

Return projects sorted in asc or desc order. Default is desc.

starred Boolean

Limit by projects starred by the current user.

statistics Boolean

Include project statistics. Cannot be used with group_id.

visibility String

Limit by visibility public, internal, or private.

withCustomAttributes Boolean

Include custom attributes in response (admins only).

withIssuesEnabled Boolean

Limit by projects with issues feature enabled. Default is false.

withMergeRequestsEnabled Boolean

Limit by projects with merge requests feature enabled. Default is false.

withProgrammingLanguage String

Limit by projects which use the given programming language. Cannot be used with group_id.

withShared Boolean

Include projects shared to this group. Default is true. Needs group_id.

id string

The provider-assigned unique ID for this managed resource.

projects GetProjectsProject[]

A list containing the projects matching the supplied arguments

archived boolean

Limit by archived status.

groupId number

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

includeSubgroups boolean

Include projects in subgroups of this group. Default is false. Needs group_id.

maxQueryablePages number

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

membership boolean

Limit by projects that the current user is a member of.

minAccessLevel number

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

orderBy string

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

owned boolean

Limit by projects owned by the current user.

page number

The first page to begin the query on.

perPage number

The number of results to return per page.

search string

Return list of authorized projects matching the search criteria.

simple boolean

Return only the ID, URL, name, and path of each project.

sort string

Return projects sorted in asc or desc order. Default is desc.

starred boolean

Limit by projects starred by the current user.

statistics boolean

Include project statistics. Cannot be used with group_id.

visibility string

Limit by visibility public, internal, or private.

withCustomAttributes boolean

Include custom attributes in response (admins only).

withIssuesEnabled boolean

Limit by projects with issues feature enabled. Default is false.

withMergeRequestsEnabled boolean

Limit by projects with merge requests feature enabled. Default is false.

withProgrammingLanguage string

Limit by projects which use the given programming language. Cannot be used with group_id.

withShared boolean

Include projects shared to this group. Default is true. Needs group_id.

id str

The provider-assigned unique ID for this managed resource.

projects Sequence[GetProjectsProject]

A list containing the projects matching the supplied arguments

archived bool

Limit by archived status.

group_id int

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

include_subgroups bool

Include projects in subgroups of this group. Default is false. Needs group_id.

max_queryable_pages int

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

membership bool

Limit by projects that the current user is a member of.

min_access_level int

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

order_by str

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

owned bool

Limit by projects owned by the current user.

page int

The first page to begin the query on.

per_page int

The number of results to return per page.

search str

Return list of authorized projects matching the search criteria.

simple bool

Return only the ID, URL, name, and path of each project.

sort str

Return projects sorted in asc or desc order. Default is desc.

starred bool

Limit by projects starred by the current user.

statistics bool

Include project statistics. Cannot be used with group_id.

visibility str

Limit by visibility public, internal, or private.

with_custom_attributes bool

Include custom attributes in response (admins only).

with_issues_enabled bool

Limit by projects with issues feature enabled. Default is false.

with_merge_requests_enabled bool

Limit by projects with merge requests feature enabled. Default is false.

with_programming_language str

Limit by projects which use the given programming language. Cannot be used with group_id.

with_shared bool

Include projects shared to this group. Default is true. Needs group_id.

id String

The provider-assigned unique ID for this managed resource.

projects List<Property Map>

A list containing the projects matching the supplied arguments

archived Boolean

Limit by archived status.

groupId Number

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

includeSubgroups Boolean

Include projects in subgroups of this group. Default is false. Needs group_id.

maxQueryablePages Number

The maximum number of project results pages that may be queried. Prevents overloading your Gitlab instance in case of a misconfiguration.

membership Boolean

Limit by projects that the current user is a member of.

minAccessLevel Number

Limit to projects where current user has at least this access level, refer to the official documentation for values. Cannot be used with group_id.

orderBy String

Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields. Default is created_at.

owned Boolean

Limit by projects owned by the current user.

page Number

The first page to begin the query on.

perPage Number

The number of results to return per page.

search String

Return list of authorized projects matching the search criteria.

simple Boolean

Return only the ID, URL, name, and path of each project.

sort String

Return projects sorted in asc or desc order. Default is desc.

starred Boolean

Limit by projects starred by the current user.

statistics Boolean

Include project statistics. Cannot be used with group_id.

visibility String

Limit by visibility public, internal, or private.

withCustomAttributes Boolean

Include custom attributes in response (admins only).

withIssuesEnabled Boolean

Limit by projects with issues feature enabled. Default is false.

withMergeRequestsEnabled Boolean

Limit by projects with merge requests feature enabled. Default is false.

withProgrammingLanguage String

Limit by projects which use the given programming language. Cannot be used with group_id.

withShared Boolean

Include projects shared to this group. Default is true. Needs group_id.

Supporting Types

GetProjectsProject

AllowMergeOnSkippedPipeline bool
AnalyticsAccessLevel string
ApprovalsBeforeMerge int
Archived bool

Limit by archived status.

AutoCancelPendingPipelines string
AutoDevopsDeployStrategy string
AutoDevopsEnabled bool
AutocloseReferencedIssues bool
AvatarUrl string
BuildCoverageRegex string
BuildGitStrategy string
BuildTimeout int
BuildsAccessLevel string
CiConfigPath string
CiDefaultGitDepth int
CiForwardDeploymentEnabled bool
ContainerExpirationPolicies List<Pulumi.GitLab.Inputs.GetProjectsProjectContainerExpirationPolicy>
ContainerRegistryAccessLevel string
ContainerRegistryEnabled bool
CreatedAt string
CreatorId int
CustomAttributes List<ImmutableDictionary<string, string>>
DefaultBranch string
Description string
EmailsDisabled bool
ExternalAuthorizationClassificationLabel string
ForkedFromProject Pulumi.GitLab.Inputs.GetProjectsProjectForkedFromProject
ForkingAccessLevel string
ForksCount int
HttpUrlToRepo string
Id int

The ID of this resource.

ImportError string
ImportStatus string
IssuesAccessLevel string
IssuesEnabled bool
JobsEnabled bool
LastActivityAt string
LfsEnabled bool
MergeCommitTemplate string
MergeMethod string
MergePipelinesEnabled bool
MergeRequestsAccessLevel string
MergeRequestsEnabled bool
MergeTrainsEnabled bool
Mirror bool
MirrorOverwritesDivergedBranches bool
MirrorTriggerBuilds bool
MirrorUserId int
Name string
NameWithNamespace string
Namespace Pulumi.GitLab.Inputs.GetProjectsProjectNamespace
OnlyAllowMergeIfAllDiscussionsAreResolved bool
OnlyAllowMergeIfPipelineSucceeds bool
OnlyMirrorProtectedBranches bool
OpenIssuesCount int
OperationsAccessLevel string
Owner Pulumi.GitLab.Inputs.GetProjectsProjectOwner
PackagesEnabled bool
Path string
PathWithNamespace string
Permissions Pulumi.GitLab.Inputs.GetProjectsProjectPermissions
Public bool
PublicBuilds bool
ReadmeUrl string
RepositoryAccessLevel string
RepositoryStorage string
RequestAccessEnabled bool
RequirementsAccessLevel string
ResolveOutdatedDiffDiscussions bool
RunnersToken string
SecurityAndComplianceAccessLevel string
SharedRunnersEnabled bool
SharedWithGroups List<Pulumi.GitLab.Inputs.GetProjectsProjectSharedWithGroup>
SnippetsAccessLevel string
SnippetsEnabled bool
SquashCommitTemplate string
SshUrlToRepo string
StarCount int
Statistics Dictionary<string, int>

Include project statistics. Cannot be used with group_id.

TagLists List<string>
Topics List<string>
Visibility string

Limit by visibility public, internal, or private.

WebUrl string
WikiAccessLevel string
WikiEnabled bool
_links Dictionary<string, string>
AllowMergeOnSkippedPipeline bool
AnalyticsAccessLevel string
ApprovalsBeforeMerge int
Archived bool

Limit by archived status.

AutoCancelPendingPipelines string
AutoDevopsDeployStrategy string
AutoDevopsEnabled bool
AutocloseReferencedIssues bool
AvatarUrl string
BuildCoverageRegex string
BuildGitStrategy string
BuildTimeout int
BuildsAccessLevel string
CiConfigPath string
CiDefaultGitDepth int
CiForwardDeploymentEnabled bool
ContainerExpirationPolicies []GetProjectsProjectContainerExpirationPolicy
ContainerRegistryAccessLevel string
ContainerRegistryEnabled bool
CreatedAt string
CreatorId int
CustomAttributes []map[string]string
DefaultBranch string
Description string
EmailsDisabled bool
ExternalAuthorizationClassificationLabel string
ForkedFromProject GetProjectsProjectForkedFromProject
ForkingAccessLevel string
ForksCount int
HttpUrlToRepo string
Id int

The ID of this resource.

ImportError string
ImportStatus string
IssuesAccessLevel string
IssuesEnabled bool
JobsEnabled bool
LastActivityAt string
LfsEnabled bool
MergeCommitTemplate string
MergeMethod string
MergePipelinesEnabled bool
MergeRequestsAccessLevel string
MergeRequestsEnabled bool
MergeTrainsEnabled bool
Mirror bool
MirrorOverwritesDivergedBranches bool
MirrorTriggerBuilds bool
MirrorUserId int
Name string
NameWithNamespace string
Namespace GetProjectsProjectNamespace
OnlyAllowMergeIfAllDiscussionsAreResolved bool
OnlyAllowMergeIfPipelineSucceeds bool
OnlyMirrorProtectedBranches bool
OpenIssuesCount int
OperationsAccessLevel string
Owner GetProjectsProjectOwner
PackagesEnabled bool
Path string
PathWithNamespace string
Permissions GetProjectsProjectPermissions
Public bool
PublicBuilds bool
ReadmeUrl string
RepositoryAccessLevel string
RepositoryStorage string
RequestAccessEnabled bool
RequirementsAccessLevel string
ResolveOutdatedDiffDiscussions bool
RunnersToken string
SecurityAndComplianceAccessLevel string
SharedRunnersEnabled bool
SharedWithGroups []GetProjectsProjectSharedWithGroup
SnippetsAccessLevel string
SnippetsEnabled bool
SquashCommitTemplate string
SshUrlToRepo string
StarCount int
Statistics map[string]int

Include project statistics. Cannot be used with group_id.

TagLists []string
Topics []string
Visibility string

Limit by visibility public, internal, or private.

WebUrl string
WikiAccessLevel string
WikiEnabled bool
_links map[string]string
_links Map<String,String>
allowMergeOnSkippedPipeline Boolean
analyticsAccessLevel String
approvalsBeforeMerge Integer
archived Boolean

Limit by archived status.

autoCancelPendingPipelines String
autoDevopsDeployStrategy String
autoDevopsEnabled Boolean
autocloseReferencedIssues Boolean
avatarUrl String
buildCoverageRegex String
buildGitStrategy String
buildTimeout Integer
buildsAccessLevel String
ciConfigPath String
ciDefaultGitDepth Integer
ciForwardDeploymentEnabled Boolean
containerExpirationPolicies List<GetProjectsProjectContainerExpirationPolicy>
containerRegistryAccessLevel String
containerRegistryEnabled Boolean
createdAt String
creatorId Integer
customAttributes List<Map<String,String>>
defaultBranch String
description String
emailsDisabled Boolean
externalAuthorizationClassificationLabel String
forkedFromProject GetProjectsProjectForkedFromProject
forkingAccessLevel String
forksCount Integer
httpUrlToRepo String
id Integer

The ID of this resource.

importError String
importStatus String
issuesAccessLevel String
issuesEnabled Boolean
jobsEnabled Boolean
lastActivityAt String
lfsEnabled Boolean
mergeCommitTemplate String
mergeMethod String
mergePipelinesEnabled Boolean
mergeRequestsAccessLevel String
mergeRequestsEnabled Boolean
mergeTrainsEnabled Boolean
mirror Boolean
mirrorOverwritesDivergedBranches Boolean
mirrorTriggerBuilds Boolean
mirrorUserId Integer
name String
nameWithNamespace String
namespace GetProjectsProjectNamespace
onlyAllowMergeIfAllDiscussionsAreResolved Boolean
onlyAllowMergeIfPipelineSucceeds Boolean
onlyMirrorProtectedBranches Boolean
openIssuesCount Integer
operationsAccessLevel String
owner GetProjectsProjectOwner
packagesEnabled Boolean
path String
pathWithNamespace String
permissions GetProjectsProjectPermissions
publicBuilds Boolean
public_ Boolean
readmeUrl String
repositoryAccessLevel String
repositoryStorage String
requestAccessEnabled Boolean
requirementsAccessLevel String
resolveOutdatedDiffDiscussions Boolean
runnersToken String
securityAndComplianceAccessLevel String
sharedRunnersEnabled Boolean
sharedWithGroups List<GetProjectsProjectSharedWithGroup>
snippetsAccessLevel String
snippetsEnabled Boolean
squashCommitTemplate String
sshUrlToRepo String
starCount Integer
statistics Map<String,Integer>

Include project statistics. Cannot be used with group_id.

tagLists List<String>
topics List<String>
visibility String

Limit by visibility public, internal, or private.

webUrl String
wikiAccessLevel String
wikiEnabled Boolean
_links {[key: string]: string}
allowMergeOnSkippedPipeline boolean
analyticsAccessLevel string
approvalsBeforeMerge number
archived boolean

Limit by archived status.

autoCancelPendingPipelines string
autoDevopsDeployStrategy string
autoDevopsEnabled boolean
autocloseReferencedIssues boolean
avatarUrl string
buildCoverageRegex string
buildGitStrategy string
buildTimeout number
buildsAccessLevel string
ciConfigPath string
ciDefaultGitDepth number
ciForwardDeploymentEnabled boolean
containerExpirationPolicies GetProjectsProjectContainerExpirationPolicy[]
containerRegistryAccessLevel string
containerRegistryEnabled boolean
createdAt string
creatorId number
customAttributes {[key: string]: string}[]
defaultBranch string
description string
emailsDisabled boolean
externalAuthorizationClassificationLabel string
forkedFromProject GetProjectsProjectForkedFromProject
forkingAccessLevel string
forksCount number
httpUrlToRepo string
id number

The ID of this resource.

importError string
importStatus string
issuesAccessLevel string
issuesEnabled boolean
jobsEnabled boolean
lastActivityAt string
lfsEnabled boolean
mergeCommitTemplate string
mergeMethod string
mergePipelinesEnabled boolean
mergeRequestsAccessLevel string
mergeRequestsEnabled boolean
mergeTrainsEnabled boolean
mirror boolean
mirrorOverwritesDivergedBranches boolean
mirrorTriggerBuilds boolean
mirrorUserId number
name string
nameWithNamespace string
namespace GetProjectsProjectNamespace
onlyAllowMergeIfAllDiscussionsAreResolved boolean
onlyAllowMergeIfPipelineSucceeds boolean
onlyMirrorProtectedBranches boolean
openIssuesCount number
operationsAccessLevel string
owner GetProjectsProjectOwner
packagesEnabled boolean
path string
pathWithNamespace string
permissions GetProjectsProjectPermissions
public boolean
publicBuilds boolean
readmeUrl string
repositoryAccessLevel string
repositoryStorage string
requestAccessEnabled boolean
requirementsAccessLevel string
resolveOutdatedDiffDiscussions boolean
runnersToken string
securityAndComplianceAccessLevel string
sharedRunnersEnabled boolean
sharedWithGroups GetProjectsProjectSharedWithGroup[]
snippetsAccessLevel string
snippetsEnabled boolean
squashCommitTemplate string
sshUrlToRepo string
starCount number
statistics {[key: string]: number}

Include project statistics. Cannot be used with group_id.

tagLists string[]
topics string[]
visibility string

Limit by visibility public, internal, or private.

webUrl string
wikiAccessLevel string
wikiEnabled boolean
_links Mapping[str, str]
allow_merge_on_skipped_pipeline bool
analytics_access_level str
approvals_before_merge int
archived bool

Limit by archived status.

auto_cancel_pending_pipelines str
auto_devops_deploy_strategy str
auto_devops_enabled bool
autoclose_referenced_issues bool
avatar_url str
build_coverage_regex str
build_git_strategy str
build_timeout int
builds_access_level str
ci_config_path str
ci_default_git_depth int
ci_forward_deployment_enabled bool
container_expiration_policies Sequence[GetProjectsProjectContainerExpirationPolicy]
container_registry_access_level str
container_registry_enabled bool
created_at str
creator_id int
custom_attributes Sequence[Mapping[str, str]]
default_branch str
description str
emails_disabled bool
external_authorization_classification_label str
forked_from_project GetProjectsProjectForkedFromProject
forking_access_level str
forks_count int
http_url_to_repo str
id int

The ID of this resource.

import_error str
import_status str
issues_access_level str
issues_enabled bool
jobs_enabled bool
last_activity_at str
lfs_enabled bool
merge_commit_template str
merge_method str
merge_pipelines_enabled bool
merge_requests_access_level str
merge_requests_enabled bool
merge_trains_enabled bool
mirror bool
mirror_overwrites_diverged_branches bool
mirror_trigger_builds bool
mirror_user_id int
name str
name_with_namespace str
namespace GetProjectsProjectNamespace
only_allow_merge_if_all_discussions_are_resolved bool
only_allow_merge_if_pipeline_succeeds bool
only_mirror_protected_branches bool
open_issues_count int
operations_access_level str
owner GetProjectsProjectOwner
packages_enabled bool
path str
path_with_namespace str
permissions GetProjectsProjectPermissions
public bool
public_builds bool
readme_url str
repository_access_level str
repository_storage str
request_access_enabled bool
requirements_access_level str
resolve_outdated_diff_discussions bool
runners_token str
security_and_compliance_access_level str
shared_runners_enabled bool
shared_with_groups Sequence[GetProjectsProjectSharedWithGroup]
snippets_access_level str
snippets_enabled bool
squash_commit_template str
ssh_url_to_repo str
star_count int
statistics Mapping[str, int]

Include project statistics. Cannot be used with group_id.

tag_lists Sequence[str]
topics Sequence[str]
visibility str

Limit by visibility public, internal, or private.

web_url str
wiki_access_level str
wiki_enabled bool
_links Map<String>
allowMergeOnSkippedPipeline Boolean
analyticsAccessLevel String
approvalsBeforeMerge Number
archived Boolean

Limit by archived status.

autoCancelPendingPipelines String
autoDevopsDeployStrategy String
autoDevopsEnabled Boolean
autocloseReferencedIssues Boolean
avatarUrl String
buildCoverageRegex String
buildGitStrategy String
buildTimeout Number
buildsAccessLevel String
ciConfigPath String
ciDefaultGitDepth Number
ciForwardDeploymentEnabled Boolean
containerExpirationPolicies List<Property Map>
containerRegistryAccessLevel String
containerRegistryEnabled Boolean
createdAt String
creatorId Number
customAttributes List<Map<String>>
defaultBranch String
description String
emailsDisabled Boolean
externalAuthorizationClassificationLabel String
forkedFromProject Property Map
forkingAccessLevel String
forksCount Number
httpUrlToRepo String
id Number

The ID of this resource.

importError String
importStatus String
issuesAccessLevel String
issuesEnabled Boolean
jobsEnabled Boolean
lastActivityAt String
lfsEnabled Boolean
mergeCommitTemplate String
mergeMethod String
mergePipelinesEnabled Boolean
mergeRequestsAccessLevel String
mergeRequestsEnabled Boolean
mergeTrainsEnabled Boolean
mirror Boolean
mirrorOverwritesDivergedBranches Boolean
mirrorTriggerBuilds Boolean
mirrorUserId Number
name String
nameWithNamespace String
namespace Property Map
onlyAllowMergeIfAllDiscussionsAreResolved Boolean
onlyAllowMergeIfPipelineSucceeds Boolean
onlyMirrorProtectedBranches Boolean
openIssuesCount Number
operationsAccessLevel String
owner Property Map
packagesEnabled Boolean
path String
pathWithNamespace String
permissions Property Map
public Boolean
publicBuilds Boolean
readmeUrl String
repositoryAccessLevel String
repositoryStorage String
requestAccessEnabled Boolean
requirementsAccessLevel String
resolveOutdatedDiffDiscussions Boolean
runnersToken String
securityAndComplianceAccessLevel String
sharedRunnersEnabled Boolean
sharedWithGroups List<Property Map>
snippetsAccessLevel String
snippetsEnabled Boolean
squashCommitTemplate String
sshUrlToRepo String
starCount Number
statistics Map<Number>

Include project statistics. Cannot be used with group_id.

tagLists List<String>
topics List<String>
visibility String

Limit by visibility public, internal, or private.

webUrl String
wikiAccessLevel String
wikiEnabled Boolean

GetProjectsProjectContainerExpirationPolicy

Cadence string
Enabled bool
KeepN int
NameRegexDelete string
NameRegexKeep string
NextRunAt string
OlderThan string
Cadence string
Enabled bool
KeepN int
NameRegexDelete string
NameRegexKeep string
NextRunAt string
OlderThan string
cadence String
enabled Boolean
keepN Integer
nameRegexDelete String
nameRegexKeep String
nextRunAt String
olderThan String
cadence string
enabled boolean
keepN number
nameRegexDelete string
nameRegexKeep string
nextRunAt string
olderThan string
cadence String
enabled Boolean
keepN Number
nameRegexDelete String
nameRegexKeep String
nextRunAt String
olderThan String

GetProjectsProjectForkedFromProject

HttpUrlToRepo string
Id int

The ID of this resource.

Name string
NameWithNamespace string
Path string
PathWithNamespace string
WebUrl string
HttpUrlToRepo string
Id int

The ID of this resource.

Name string
NameWithNamespace string
Path string
PathWithNamespace string
WebUrl string
httpUrlToRepo String
id Integer

The ID of this resource.

name String
nameWithNamespace String
path String
pathWithNamespace String
webUrl String
httpUrlToRepo string
id number

The ID of this resource.

name string
nameWithNamespace string
path string
pathWithNamespace string
webUrl string
http_url_to_repo str
id int

The ID of this resource.

name str
name_with_namespace str
path str
path_with_namespace str
web_url str
httpUrlToRepo String
id Number

The ID of this resource.

name String
nameWithNamespace String
path String
pathWithNamespace String
webUrl String

GetProjectsProjectNamespace

FullPath string
Id int

The ID of this resource.

Kind string
Name string
Path string
FullPath string
Id int

The ID of this resource.

Kind string
Name string
Path string
fullPath String
id Integer

The ID of this resource.

kind String
name String
path String
fullPath string
id number

The ID of this resource.

kind string
name string
path string
full_path str
id int

The ID of this resource.

kind str
name str
path str
fullPath String
id Number

The ID of this resource.

kind String
name String
path String

GetProjectsProjectOwner

AvatarUrl string
Id int

The ID of this resource.

Name string
State string
Username string
WebsiteUrl string
AvatarUrl string
Id int

The ID of this resource.

Name string
State string
Username string
WebsiteUrl string
avatarUrl String
id Integer

The ID of this resource.

name String
state String
username String
websiteUrl String
avatarUrl string
id number

The ID of this resource.

name string
state string
username string
websiteUrl string
avatar_url str
id int

The ID of this resource.

name str
state str
username str
website_url str
avatarUrl String
id Number

The ID of this resource.

name String
state String
username String
websiteUrl String

GetProjectsProjectPermissions

GroupAccess Dictionary<string, int>
ProjectAccess Dictionary<string, int>
GroupAccess map[string]int
ProjectAccess map[string]int
groupAccess Map<String,Integer>
projectAccess Map<String,Integer>
groupAccess {[key: string]: number}
projectAccess {[key: string]: number}
group_access Mapping[str, int]
project_access Mapping[str, int]
groupAccess Map<Number>
projectAccess Map<Number>

GetProjectsProjectSharedWithGroup

GroupAccessLevel string
GroupId int

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

GroupName string
GroupAccessLevel string
GroupId int

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

GroupName string
groupAccessLevel String
groupId Integer

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

groupName String
groupAccessLevel string
groupId number

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

groupName string
group_access_level str
group_id int

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

group_name str
groupAccessLevel String
groupId Number

The ID of the group owned by the authenticated user to look projects for within. Cannot be used with min_access_level, with_programming_language or statistics.

groupName String

Package Details

Repository
GitLab pulumi/pulumi-gitlab
License
Apache-2.0
Notes

This Pulumi package is based on the gitlab Terraform Provider.