get Project
The gitlab.Project
data source allows details of a project to be retrieved by either its ID or its path with namespace. Upstream API: GitLab REST API docs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const example = gitlab.getProject({
pathWithNamespace: "foo/bar/baz",
});
Content copied to clipboard
import pulumi
import pulumi_gitlab as gitlab
example = gitlab.get_project(path_with_namespace="foo/bar/baz")
Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var example = GitLab.GetProject.Invoke(new()
{
PathWithNamespace = "foo/bar/baz",
});
});
Content copied to clipboard
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.LookupProject(ctx, &gitlab.LookupProjectArgs{
PathWithNamespace: pulumi.StringRef("foo/bar/baz"),
}, nil)
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
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.GetProjectArgs;
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.getProject(GetProjectArgs.builder()
.pathWithNamespace("foo/bar/baz")
.build());
}
}
Content copied to clipboard
variables:
example:
fn::invoke:
Function: gitlab:getProject
Arguments:
pathWithNamespace: foo/bar/baz
Content copied to clipboard
Return
A collection of values returned by getProject.
Parameters
argument
A collection of arguments for invoking getProject.
suspend fun getProject(ciDefaultGitDepth: Int? = null, id: String? = null, pathWithNamespace: String? = null, publicBuilds: Boolean? = null): GetProjectResult
Return
A collection of values returned by getProject.
Parameters
ci Default Git Depth
Default number of revisions for shallow cloning.
id
The integer that uniquely identifies the project within the gitlab install.
path With Namespace
The path of the repository with namespace.
public Builds
If true, jobs can be viewed by non-project members.
See also
Return
A collection of values returned by getProject.
Parameters
argument
Builder for com.pulumi.gitlab.kotlin.inputs.GetProjectPlainArgs.