getProject

# gitlab_project

Provides details about a specific project in the gitlab provider. The results include the name of the project, path, description, default branch, etc.

Example Usage

using Pulumi;
using GitLab = Pulumi.GitLab;

class MyStack : Stack
{
    public MyStack()
    {
        var example = Output.Create(GitLab.GetProject.InvokeAsync(new GitLab.GetProjectArgs
        {
            Id = "30",
        }));
    }

}
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 {
		_, err := gitlab.LookupProject(ctx, &gitlab.LookupProjectArgs{
			Id: "30",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_gitlab as gitlab

example = gitlab.get_project(id="30")
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const example = pulumi.output(gitlab.getProject({
    id: "30",
}, { async: true }));

Using getProject

function getProject(args: GetProjectArgs, opts?: InvokeOptions): Promise<GetProjectResult>
def get_project(id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetProjectResult
func LookupProject(ctx *Context, args *LookupProjectArgs, opts ...InvokeOption) (*LookupProjectResult, error)

Note: This function is named LookupProject in the Go SDK.

public static class GetProject {
    public static Task<GetProjectResult> InvokeAsync(GetProjectArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Id string
The integer or path with namespace that uniquely identifies the project within the gitlab install.
Id string
The integer or path with namespace that uniquely identifies the project within the gitlab install.
id string
The integer or path with namespace that uniquely identifies the project within the gitlab install.
id str
The integer or path with namespace that uniquely identifies the project within the gitlab install.

getProject Result

The following output properties are available:

Archived bool
Whether the project is in read-only mode (archived).
DefaultBranch string
The default branch for the project.
Description string
A description of the project.
HttpUrlToRepo string
URL that can be provided to git clone to clone the repository via HTTP.
Id string
Integer that uniquely identifies the project within the gitlab install.
IssuesEnabled bool
Enable issue tracking for the project.
LfsEnabled bool
Enable LFS for the project.
MergeRequestsEnabled bool
Enable merge requests for the project.
Name string
NamespaceId int
The namespace (group or user) of the project. Defaults to your user. See gitlab.Group for an example.
Path string
The path of the repository.
PathWithNamespace string
The path of the repository with namespace.
PipelinesEnabled bool
Enable pipelines for the project.
PushRules Pulumi.GitLab.Outputs.GetProjectPushRules
RemoveSourceBranchAfterMerge bool
Enable Delete source branch option by default for all new merge requests
RequestAccessEnabled bool
Allow users to request member access.
RunnersToken string
Registration token to use during runner setup.
SnippetsEnabled bool
Enable snippets for the project.
SshUrlToRepo string
URL that can be provided to git clone to clone the repository via SSH.
VisibilityLevel string
Repositories are created as private by default.
WebUrl string
URL that can be used to find the project in a browser.
WikiEnabled bool
Enable wiki for the project.
Archived bool
Whether the project is in read-only mode (archived).
DefaultBranch string
The default branch for the project.
Description string
A description of the project.
HttpUrlToRepo string
URL that can be provided to git clone to clone the repository via HTTP.
Id string
Integer that uniquely identifies the project within the gitlab install.
IssuesEnabled bool
Enable issue tracking for the project.
LfsEnabled bool
Enable LFS for the project.
MergeRequestsEnabled bool
Enable merge requests for the project.
Name string
NamespaceId int
The namespace (group or user) of the project. Defaults to your user. See gitlab.Group for an example.
Path string
The path of the repository.
PathWithNamespace string
The path of the repository with namespace.
PipelinesEnabled bool
Enable pipelines for the project.
PushRules GetProjectPushRules
RemoveSourceBranchAfterMerge bool
Enable Delete source branch option by default for all new merge requests
RequestAccessEnabled bool
Allow users to request member access.
RunnersToken string
Registration token to use during runner setup.
SnippetsEnabled bool
Enable snippets for the project.
SshUrlToRepo string
URL that can be provided to git clone to clone the repository via SSH.
VisibilityLevel string
Repositories are created as private by default.
WebUrl string
URL that can be used to find the project in a browser.
WikiEnabled bool
Enable wiki for the project.
archived boolean
Whether the project is in read-only mode (archived).
defaultBranch string
The default branch for the project.
description string
A description of the project.
httpUrlToRepo string
URL that can be provided to git clone to clone the repository via HTTP.
id string
Integer that uniquely identifies the project within the gitlab install.
issuesEnabled boolean
Enable issue tracking for the project.
lfsEnabled boolean
Enable LFS for the project.
mergeRequestsEnabled boolean
Enable merge requests for the project.
name string
namespaceId number
The namespace (group or user) of the project. Defaults to your user. See gitlab.Group for an example.
path string
The path of the repository.
pathWithNamespace string
The path of the repository with namespace.
pipelinesEnabled boolean
Enable pipelines for the project.
pushRules GetProjectPushRules
removeSourceBranchAfterMerge boolean
Enable Delete source branch option by default for all new merge requests
requestAccessEnabled boolean
Allow users to request member access.
runnersToken string
Registration token to use during runner setup.
snippetsEnabled boolean
Enable snippets for the project.
sshUrlToRepo string
URL that can be provided to git clone to clone the repository via SSH.
visibilityLevel string
Repositories are created as private by default.
webUrl string
URL that can be used to find the project in a browser.
wikiEnabled boolean
Enable wiki for the project.
archived bool
Whether the project is in read-only mode (archived).
default_branch str
The default branch for the project.
description str
A description of the project.
http_url_to_repo str
URL that can be provided to git clone to clone the repository via HTTP.
id str
Integer that uniquely identifies the project within the gitlab install.
issues_enabled bool
Enable issue tracking for the project.
lfs_enabled bool
Enable LFS for the project.
merge_requests_enabled bool
Enable merge requests for the project.
name str
namespace_id int
The namespace (group or user) of the project. Defaults to your user. See gitlab.Group for an example.
path str
The path of the repository.
path_with_namespace str
The path of the repository with namespace.
pipelines_enabled bool
Enable pipelines for the project.
push_rules GetProjectPushRules
remove_source_branch_after_merge bool
Enable Delete source branch option by default for all new merge requests
request_access_enabled bool
Allow users to request member access.
runners_token str
Registration token to use during runner setup.
snippets_enabled bool
Enable snippets for the project.
ssh_url_to_repo str
URL that can be provided to git clone to clone the repository via SSH.
visibility_level str
Repositories are created as private by default.
web_url str
URL that can be used to find the project in a browser.
wiki_enabled bool
Enable wiki for the project.

Supporting Types

GetProjectPushRules

AuthorEmailRegex string
All commit author emails must match this regex, e.g. @my-company.com$.
BranchNameRegex string
All branch names must match this regex, e.g. (feature|hotfix)\/*.
CommitCommitterCheck bool
Users can only push commits to this repository that were committed with one of their own verified emails.
CommitMessageNegativeRegex string
No commit message is allowed to match this regex, for example ssh\:\/\/.
CommitMessageRegex string
All commit messages must match this regex, e.g. Fixed \d+\..*.
DenyDeleteTag bool
Deny deleting a tag.
FileNameRegex string
All commited filenames must not match this regex, e.g. (jar|exe)$.
MaxFileSize int
Maximum file size (MB).
MemberCheck bool
Restrict commits by author (email) to existing GitLab users.
PreventSecrets bool
GitLab will reject any files that are likely to contain secrets.
RejectUnsignedCommits bool
Reject commit when it’s not signed through GPG.
AuthorEmailRegex string
All commit author emails must match this regex, e.g. @my-company.com$.
BranchNameRegex string
All branch names must match this regex, e.g. (feature|hotfix)\/*.
CommitCommitterCheck bool
Users can only push commits to this repository that were committed with one of their own verified emails.
CommitMessageNegativeRegex string
No commit message is allowed to match this regex, for example ssh\:\/\/.
CommitMessageRegex string
All commit messages must match this regex, e.g. Fixed \d+\..*.
DenyDeleteTag bool
Deny deleting a tag.
FileNameRegex string
All commited filenames must not match this regex, e.g. (jar|exe)$.
MaxFileSize int
Maximum file size (MB).
MemberCheck bool
Restrict commits by author (email) to existing GitLab users.
PreventSecrets bool
GitLab will reject any files that are likely to contain secrets.
RejectUnsignedCommits bool
Reject commit when it’s not signed through GPG.
authorEmailRegex string
All commit author emails must match this regex, e.g. @my-company.com$.
branchNameRegex string
All branch names must match this regex, e.g. (feature|hotfix)\/*.
commitCommitterCheck boolean
Users can only push commits to this repository that were committed with one of their own verified emails.
commitMessageNegativeRegex string
No commit message is allowed to match this regex, for example ssh\:\/\/.
commitMessageRegex string
All commit messages must match this regex, e.g. Fixed \d+\..*.
denyDeleteTag boolean
Deny deleting a tag.
fileNameRegex string
All commited filenames must not match this regex, e.g. (jar|exe)$.
maxFileSize number
Maximum file size (MB).
memberCheck boolean
Restrict commits by author (email) to existing GitLab users.
preventSecrets boolean
GitLab will reject any files that are likely to contain secrets.
rejectUnsignedCommits boolean
Reject commit when it’s not signed through GPG.
author_email_regex str
All commit author emails must match this regex, e.g. @my-company.com$.
branch_name_regex str
All branch names must match this regex, e.g. (feature|hotfix)\/*.
commit_committer_check bool
Users can only push commits to this repository that were committed with one of their own verified emails.
commit_message_negative_regex str
No commit message is allowed to match this regex, for example ssh\:\/\/.
commit_message_regex str
All commit messages must match this regex, e.g. Fixed \d+\..*.
deny_delete_tag bool
Deny deleting a tag.
file_name_regex str
All commited filenames must not match this regex, e.g. (jar|exe)$.
max_file_size int
Maximum file size (MB).
member_check bool
Restrict commits by author (email) to existing GitLab users.
prevent_secrets bool
GitLab will reject any files that are likely to contain secrets.
reject_unsigned_commits bool
Reject commit when it’s not signed through GPG.

Package Details

Repository
https://github.com/pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.