GetProjects
Provides details about a list of projects in the Gitlab provider. Listing all projects and group projects with project filtering or group project filtering is supported.
NOTE: This data source supports all available filters exposed by the
xanzy/go-gitlabpackage, which might not expose all available filters exposed by the Gitlab APIs.
Example Usage
List projects within a group tree
using Pulumi;
using GitLab = Pulumi.GitLab;
class MyStack : Stack
{
public MyStack()
{
var mygroup = Output.Create(GitLab.GetGroup.InvokeAsync(new GitLab.GetGroupArgs
{
FullPath = "mygroup",
}));
var groupProjects = mygroup.Apply(mygroup => Output.Create(GitLab.GetProjects.InvokeAsync(new GitLab.GetProjectsArgs
{
GroupId = mygroup.Id,
OrderBy = "name",
IncludeSubgroups = true,
WithShared = false,
})));
}
}
Coming soon!
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)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,
}));List projects using the search syntax
using Pulumi;
using GitLab = Pulumi.GitLab;
class MyStack : Stack
{
public MyStack()
{
var projects = Output.Create(GitLab.GetProjects.InvokeAsync(new GitLab.GetProjectsArgs
{
Search = "postgresql",
Visibility = "private",
}));
}
}
Coming soon!
import pulumi
import pulumi_gitlab as gitlab
projects = gitlab.get_projects(search="postgresql",
visibility="private")import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const projects = pulumi.output(gitlab.getProjects({
search: "postgresql",
visibility: "private",
}, { async: true }));Using GetProjects
function getProjects(args: GetProjectsArgs, opts?: InvokeOptions): Promise<GetProjectsResult>function get_projects(archived=None, group_id=None, include_subgroups=None, max_queryable_pages=None, membership=None, min_access_level=None, order_by=None, owned=None, page=None, per_page=None, search=None, simple=None, sort=None, starred=None, statistics=None, visibility=None, with_custom_attributes=None, with_issues_enabled=None, with_merge_requests_enabled=None, with_programming_language=None, with_shared=None, opts=None)func GetProjects(ctx *Context, args *GetProjectsArgs, opts ...InvokeOption) (*GetProjectsResult, error)public static class GetProjects {
public static Task<GetProjectsResult> InvokeAsync(GetProjectsArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- 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_languageorstatistics.- Include
Subgroups bool Include projects in subgroups of this group. Default is
false. Needsgroup_id.- Max
Queryable intPages Prevents overloading your Gitlab instance in case of a misconfiguration. Default is
10.- Membership bool
Limit by projects that the current user is a member of.
- Min
Access intLevel 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 string Return projects ordered by
id,name,path,created_at,updated_at, orlast_activity_atfields. Default iscreated_at.- Owned bool
Limit by projects owned by the current user.
- Page int
- Per
Page int - 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
ascordescorder. Default isdesc.- 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, orprivate.- With
Custom boolAttributes Include custom attributes in response (admins only).
- With
Issues boolEnabled Limit by projects with issues feature enabled. Default is
false.- With
Merge boolRequests Enabled Limit by projects with merge requests feature enabled. Default is
false.- With
Programming stringLanguage Limit by projects which use the given programming language. Cannot be used with
group_id.- bool
Include projects shared to this group. Default is
true. Needsgroup_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_languageorstatistics.- Include
Subgroups bool Include projects in subgroups of this group. Default is
false. Needsgroup_id.- Max
Queryable intPages Prevents overloading your Gitlab instance in case of a misconfiguration. Default is
10.- Membership bool
Limit by projects that the current user is a member of.
- Min
Access intLevel 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 string Return projects ordered by
id,name,path,created_at,updated_at, orlast_activity_atfields. Default iscreated_at.- Owned bool
Limit by projects owned by the current user.
- Page int
- Per
Page int - 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
ascordescorder. Default isdesc.- 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, orprivate.- With
Custom boolAttributes Include custom attributes in response (admins only).
- With
Issues boolEnabled Limit by projects with issues feature enabled. Default is
false.- With
Merge boolRequests Enabled Limit by projects with merge requests feature enabled. Default is
false.- With
Programming stringLanguage Limit by projects which use the given programming language. Cannot be used with
group_id.- bool
Include projects shared to this group. Default is
true. Needsgroup_id.
- archived boolean
Limit by archived status.
- group
Id 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_languageorstatistics.- include
Subgroups boolean Include projects in subgroups of this group. Default is
false. Needsgroup_id.- max
Queryable numberPages Prevents overloading your Gitlab instance in case of a misconfiguration. Default is
10.- membership boolean
Limit by projects that the current user is a member of.
- min
Access numberLevel 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 string Return projects ordered by
id,name,path,created_at,updated_at, orlast_activity_atfields. Default iscreated_at.- owned boolean
Limit by projects owned by the current user.
- page number
- per
Page number - 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
ascordescorder. Default isdesc.- 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, orprivate.- with
Custom booleanAttributes Include custom attributes in response (admins only).
- with
Issues booleanEnabled Limit by projects with issues feature enabled. Default is
false.- with
Merge booleanRequests Enabled Limit by projects with merge requests feature enabled. Default is
false.- with
Programming stringLanguage Limit by projects which use the given programming language. Cannot be used with
group_id.- boolean
Include projects shared to this group. Default is
true. Needsgroup_id.
- archived bool
Limit by archived status.
- group_
id float The ID of the group owned by the authenticated user to look projects for within. Cannot be used with
min_access_level,with_programming_languageorstatistics.- include_
subgroups bool Include projects in subgroups of this group. Default is
false. Needsgroup_id.- max_
queryable_ floatpages Prevents overloading your Gitlab instance in case of a misconfiguration. Default is
10.- membership bool
Limit by projects that the current user is a member of.
- min_
access_ floatlevel 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, orlast_activity_atfields. Default iscreated_at.- owned bool
Limit by projects owned by the current user.
- page float
- per_
page float - 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
ascordescorder. Default isdesc.- 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, orprivate.- with_
custom_ boolattributes Include custom attributes in response (admins only).
- with_
issues_ boolenabled Limit by projects with issues feature enabled. Default is
false.- with_
merge_ boolrequests_ enabled Limit by projects with merge requests feature enabled. Default is
false.- with_
programming_ strlanguage Limit by projects which use the given programming language. Cannot be used with
group_id.- bool
Include projects shared to this group. Default is
true. Needsgroup_id.
GetProjects Result
The following output properties are available:
- Id string
The provider-assigned unique ID for this managed resource.
- Projects
List<Pulumi.
Git Lab. Outputs. Get Projects Project> A list containing the projects matching the supplied arguments
- Archived bool
- Group
Id int - Include
Subgroups bool - Max
Queryable intPages - Membership bool
- Min
Access intLevel - Order
By string - Owned bool
- Page int
- Per
Page int - Search string
- Simple bool
- Sort string
- Starred bool
- Statistics bool
- Visibility string
The visibility of the project.
- With
Custom boolAttributes - With
Issues boolEnabled - With
Merge boolRequests Enabled - With
Programming stringLanguage - bool
- Id string
The provider-assigned unique ID for this managed resource.
- Projects
[]Get
Projects Project A list containing the projects matching the supplied arguments
- Archived bool
- Group
Id int - Include
Subgroups bool - Max
Queryable intPages - Membership bool
- Min
Access intLevel - Order
By string - Owned bool
- Page int
- Per
Page int - Search string
- Simple bool
- Sort string
- Starred bool
- Statistics bool
- Visibility string
The visibility of the project.
- With
Custom boolAttributes - With
Issues boolEnabled - With
Merge boolRequests Enabled - With
Programming stringLanguage - bool
- id string
The provider-assigned unique ID for this managed resource.
- projects
Get
Projects Project[] A list containing the projects matching the supplied arguments
- archived boolean
- group
Id number - include
Subgroups boolean - max
Queryable numberPages - membership boolean
- min
Access numberLevel - order
By string - owned boolean
- page number
- per
Page number - search string
- simple boolean
- sort string
- starred boolean
- statistics boolean
- visibility string
The visibility of the project.
- with
Custom booleanAttributes - with
Issues booleanEnabled - with
Merge booleanRequests Enabled - with
Programming stringLanguage - boolean
- id str
The provider-assigned unique ID for this managed resource.
- projects
List[Get
Projects Project] A list containing the projects matching the supplied arguments
- archived bool
- group_
id float - include_
subgroups bool - max_
queryable_ floatpages - membership bool
- min_
access_ floatlevel - order_
by str - owned bool
- page float
- per_
page float - search str
- simple bool
- sort str
- starred bool
- statistics bool
- visibility str
The visibility of the project.
- with_
custom_ boolattributes - with_
issues_ boolenabled - with_
merge_ boolrequests_ enabled - with_
programming_ strlanguage - bool
Supporting Types
GetProjectsProject
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Approvals
Before intMerge The numbers of approvals needed in a merge requests.
- Archived bool
Limit by archived status.
- Avatar
Url string - Ci
Config stringPath - Container
Registry boolEnabled - Created
At string - Creator
Id int - Custom
Attributes List<ImmutableDictionary<string, object>> - Default
Branch string - Description string
- Forked
From Pulumi.Project Git Lab. Inputs. Get Projects Project Forked From Project Args - Forks
Count int - Http
Url stringTo Repo The HTTP clone URL of the project.
- Id int
The ID of the project.
- Import
Error string - Import
Status string - Issues
Enabled bool - Jobs
Enabled bool Whether pipelines are enabled for the project.
- Last
Activity stringAt - Lfs
Enabled bool - Merge
Method string - Merge
Requests boolEnabled - Mirror bool
- Mirror
Overwrites boolDiverged Branches - Mirror
Trigger boolBuilds - Mirror
User intId - Name string
The name of the project.
- Name
With stringNamespace In
group / subgroup / projectoruser / projectformat.- Namespace
Pulumi.
Git Lab. Inputs. Get Projects Project Namespace Args - Only
Allow boolMerge If All Discussions Are Resolved - Only
Allow boolMerge If Pipeline Succeeds - Only
Mirror boolProtected Branches - Open
Issues intCount - Owner
Pulumi.
Git Lab. Inputs. Get Projects Project Owner Args - Path string
- Path
With stringNamespace In
group/subgroup/projectoruser/projectformat.- Permissions
Pulumi.
Git Lab. Inputs. Get Projects Project Permissions Args - Public bool
Whether the project is public.
- Public
Builds bool - Readme
Url string - Request
Access boolEnabled - Resolve
Outdated boolDiff Discussions - Runners
Token string - bool
-
List<Pulumi.
Git Lab. Inputs. Get Projects Project Shared With Group Args> - Snippets
Enabled bool - Ssh
Url stringTo Repo The SSH clone URL of the project.
- Star
Count int - Statistics Dictionary<string, int>
Include project statistics. Cannot be used with
group_id.- Tag
Lists List<string> A set of the project topics (formerly called “project tags”).
- Visibility string
Limit by visibility
public,internal, orprivate.- Web
Url string - Wiki
Enabled bool - _
links Dictionary<string, string>
- Approvals
Before intMerge The numbers of approvals needed in a merge requests.
- Archived bool
Limit by archived status.
- Avatar
Url string - Ci
Config stringPath - Container
Registry boolEnabled - Created
At string - Creator
Id int - Custom
Attributes []map[string]interface{} - Default
Branch string - Description string
- Forked
From GetProject Projects Project Forked From Project - Forks
Count int - Http
Url stringTo Repo The HTTP clone URL of the project.
- Id int
The ID of the project.
- Import
Error string - Import
Status string - Issues
Enabled bool - Jobs
Enabled bool Whether pipelines are enabled for the project.
- Last
Activity stringAt - Lfs
Enabled bool - Merge
Method string - Merge
Requests boolEnabled - Mirror bool
- Mirror
Overwrites boolDiverged Branches - Mirror
Trigger boolBuilds - Mirror
User intId - Name string
The name of the project.
- Name
With stringNamespace In
group / subgroup / projectoruser / projectformat.- Namespace
Get
Projects Project Namespace - Only
Allow boolMerge If All Discussions Are Resolved - Only
Allow boolMerge If Pipeline Succeeds - Only
Mirror boolProtected Branches - Open
Issues intCount - Owner
Get
Projects Project Owner - Path string
- Path
With stringNamespace In
group/subgroup/projectoruser/projectformat.- Permissions
Get
Projects Project Permissions - Public bool
Whether the project is public.
- Public
Builds bool - Readme
Url string - Request
Access boolEnabled - Resolve
Outdated boolDiff Discussions - Runners
Token string - bool
-
[]Get
Projects Project Shared With Group - Snippets
Enabled bool - Ssh
Url stringTo Repo The SSH clone URL of the project.
- Star
Count int - Statistics map[string]int
Include project statistics. Cannot be used with
group_id.- Tag
Lists []string A set of the project topics (formerly called “project tags”).
- Visibility string
Limit by visibility
public,internal, orprivate.- Web
Url string - Wiki
Enabled bool - _
links map[string]string
- _
links {[key: string]: string} - approvals
Before numberMerge The numbers of approvals needed in a merge requests.
- archived boolean
Limit by archived status.
- avatar
Url string - ci
Config stringPath - container
Registry booleanEnabled - created
At string - creator
Id number - custom
Attributes {[key: string]: any}[] - default
Branch string - description string
- forked
From GetProject Projects Project Forked From Project - forks
Count number - http
Url stringTo Repo The HTTP clone URL of the project.
- id number
The ID of the project.
- import
Error string - import
Status string - issues
Enabled boolean - jobs
Enabled boolean Whether pipelines are enabled for the project.
- last
Activity stringAt - lfs
Enabled boolean - merge
Method string - merge
Requests booleanEnabled - mirror boolean
- mirror
Overwrites booleanDiverged Branches - mirror
Trigger booleanBuilds - mirror
User numberId - name string
The name of the project.
- name
With stringNamespace In
group / subgroup / projectoruser / projectformat.- namespace
Get
Projects Project Namespace - only
Allow booleanMerge If All Discussions Are Resolved - only
Allow booleanMerge If Pipeline Succeeds - only
Mirror booleanProtected Branches - open
Issues numberCount - owner
Get
Projects Project Owner - path string
- path
With stringNamespace In
group/subgroup/projectoruser/projectformat.- permissions
Get
Projects Project Permissions - public boolean
Whether the project is public.
- public
Builds boolean - readme
Url string - request
Access booleanEnabled - resolve
Outdated booleanDiff Discussions - runners
Token string - boolean
-
Get
Projects Project Shared With Group[] - snippets
Enabled boolean - ssh
Url stringTo Repo The SSH clone URL of the project.
- star
Count number - statistics {[key: string]: number}
Include project statistics. Cannot be used with
group_id.- tag
Lists string[] A set of the project topics (formerly called “project tags”).
- visibility string
Limit by visibility
public,internal, orprivate.- web
Url string - wiki
Enabled boolean
- _
links Dict[str, str] - approvals_
before_ floatmerge The numbers of approvals needed in a merge requests.
- archived bool
Limit by archived status.
- avatar
Url str - ci
Config strPath - container_
registry_ boolenabled - created_
at str - creator
Id float - custom
Attributes List[Any>] - default_
branch str - description str
- forked
From Dict[GetProject Projects Project Forked From Project] - forks
Count float - http_
url_ strto_ repo The HTTP clone URL of the project.
- id float
The ID of the project.
- import
Error str - import
Status str - issues_
enabled bool - jobs
Enabled bool Whether pipelines are enabled for the project.
- last
Activity strAt - lfs_
enabled bool - merge_
method str - merge_
requests_ boolenabled - mirror bool
- mirror
Overwrites boolDiverged Branches - mirror
Trigger boolBuilds - mirror
User floatId - name str
The name of the project.
- name
With strNamespace In
group / subgroup / projectoruser / projectformat.- namespace
Dict[Get
Projects Project Namespace] - only
Mirror boolProtected Branches - only_
allow_ boolmerge_ if_ all_ discussions_ are_ resolved - only_
allow_ boolmerge_ if_ pipeline_ succeeds - open
Issues floatCount - owner
Dict[Get
Projects Project Owner] - path str
- path
With strNamespace In
group/subgroup/projectoruser/projectformat.- permissions
Dict[Get
Projects Project Permissions] - public bool
Whether the project is public.
- public
Builds bool - readme
Url str - request_
access_ boolenabled - resolve
Outdated boolDiff Discussions - runners_
token str - bool
-
List[Get
Projects Project Shared With Group] - snippets_
enabled bool - ssh_
url_ strto_ repo The SSH clone URL of the project.
- star
Count float - statistics Dict[str, Integer]
Include project statistics. Cannot be used with
group_id.- tag
Lists List[str] A set of the project topics (formerly called “project tags”).
- visibility str
Limit by visibility
public,internal, orprivate.- web_
url str - wiki_
enabled bool
GetProjectsProjectForkedFromProject
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Http
Url stringTo Repo The HTTP clone URL of the project.
- Id int
The ID of the project.
- Name string
The name of the project.
- Name
With stringNamespace In
group / subgroup / projectoruser / projectformat.- Path string
- Path
With stringNamespace In
group/subgroup/projectoruser/projectformat.- Web
Url string
- Http
Url stringTo Repo The HTTP clone URL of the project.
- Id int
The ID of the project.
- Name string
The name of the project.
- Name
With stringNamespace In
group / subgroup / projectoruser / projectformat.- Path string
- Path
With stringNamespace In
group/subgroup/projectoruser/projectformat.- Web
Url string
- http
Url stringTo Repo The HTTP clone URL of the project.
- id number
The ID of the project.
- name string
The name of the project.
- name
With stringNamespace In
group / subgroup / projectoruser / projectformat.- path string
- path
With stringNamespace In
group/subgroup/projectoruser/projectformat.- web
Url string
- http_
url_ strto_ repo The HTTP clone URL of the project.
- id float
The ID of the project.
- name str
The name of the project.
- name
With strNamespace In
group / subgroup / projectoruser / projectformat.- path str
- path
With strNamespace In
group/subgroup/projectoruser/projectformat.- web_
url str
GetProjectsProjectNamespace
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetProjectsProjectOwner
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
GetProjectsProjectPermissions
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
- Group
Access Dictionary<string, int> - Project
Access Dictionary<string, int>
- Group
Access map[string]int - Project
Access map[string]int
- group
Access {[key: string]: number} - project
Access {[key: string]: number}
- group
Access Dict[str, Integer] - project
Access Dict[str, Integer]
GetProjectsProjectSharedWithGroup
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-gitlab
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
gitlabTerraform Provider.