getProjectIds

The gitlab.getProjectIds data source identification information for a given project, allowing a user to translate a full path or ID into the GraphQL ID of the project. Upstream API: GitLab GraphQL API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";
const newProject = new gitlab.Project("new_project", {});
// use project IDs to get additional information, such as the GraphQL ID
// for other resources
const foo = gitlab.getProjectIds({
project: "gitlab_project.new_project.id",
});
export const graphQLId = foo.then(foo => foo.projectGraphqlId);
import pulumi
import pulumi_gitlab as gitlab
new_project = gitlab.Project("new_project")
# use project IDs to get additional information, such as the GraphQL ID
# for other resources
foo = gitlab.get_project_ids(project="gitlab_project.new_project.id")
pulumi.export("graphQLId", foo.project_graphql_id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;
return await Deployment.RunAsync(() =>
{
var newProject = new GitLab.Project("new_project");
// use project IDs to get additional information, such as the GraphQL ID
// for other resources
var foo = GitLab.GetProjectIds.Invoke(new()
{
Project = "gitlab_project.new_project.id",
});
return new Dictionary<string, object?>
{
["graphQLId"] = foo.Apply(getProjectIdsResult => getProjectIdsResult.ProjectGraphqlId),
};
});
package main
import (
"github.com/pulumi/pulumi-gitlab/sdk/v8/go/gitlab"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := gitlab.NewProject(ctx, "new_project", nil)
if err != nil {
return err
}
// use project IDs to get additional information, such as the GraphQL ID
// for other resources
foo, err := gitlab.GetProjectIds(ctx, &gitlab.GetProjectIdsArgs{
Project: "gitlab_project.new_project.id",
}, nil)
if err != nil {
return err
}
ctx.Export("graphQLId", foo.ProjectGraphqlId)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gitlab.Project;
import com.pulumi.gitlab.GitlabFunctions;
import com.pulumi.gitlab.inputs.GetProjectIdsArgs;
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 newProject = new Project("newProject");
// use project IDs to get additional information, such as the GraphQL ID
// for other resources
final var foo = GitlabFunctions.getProjectIds(GetProjectIdsArgs.builder()
.project("gitlab_project.new_project.id")
.build());
ctx.export("graphQLId", foo.applyValue(getProjectIdsResult -> getProjectIdsResult.projectGraphqlId()));
}
}
resources:
newProject:
type: gitlab:Project
name: new_project
variables:
# use project IDs to get additional information, such as the GraphQL ID
# // for other resources
foo:
fn::invoke:
function: gitlab:getProjectIds
arguments:
project: gitlab_project.new_project.id
outputs:
graphQLId: ${foo.projectGraphqlId}

Return

A collection of values returned by getProjectIds.

Parameters

argument

A collection of arguments for invoking getProjectIds.


Return

A collection of values returned by getProjectIds.

Parameters

project

The ID or URL-encoded path of the project.

See also


Return

A collection of values returned by getProjectIds.

Parameters

argument

Builder for com.pulumi.gitlab.kotlin.inputs.GetProjectIdsPlainArgs.

See also