1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getProjectIssue
GitLab v8.11.0 published on Friday, Apr 18, 2025 by Pulumi

gitlab.getProjectIssue

Explore with Pulumi AI

GitLab v8.11.0 published on Friday, Apr 18, 2025 by Pulumi

The gitlab.ProjectIssue data source allows to retrieve details about an issue in a project.

Upstream API: GitLab API docs

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gitlab from "@pulumi/gitlab";

const foo = gitlab.getProject({
    pathWithNamespace: "foo/bar/baz",
});
const welcomeIssue = foo.then(foo => gitlab.getProjectIssue({
    project: foo.id,
    iid: 1,
}));
export const welcomeIssueWebUrl = webUrl;
Copy
import pulumi
import pulumi_gitlab as gitlab

foo = gitlab.get_project(path_with_namespace="foo/bar/baz")
welcome_issue = gitlab.get_project_issue(project=foo.id,
    iid=1)
pulumi.export("welcomeIssueWebUrl", web_url)
Copy
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 {
		foo, err := gitlab.LookupProject(ctx, &gitlab.LookupProjectArgs{
			PathWithNamespace: pulumi.StringRef("foo/bar/baz"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = gitlab.LookupProjectIssue(ctx, &gitlab.LookupProjectIssueArgs{
			Project: foo.Id,
			Iid:     1,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("welcomeIssueWebUrl", webUrl)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using GitLab = Pulumi.GitLab;

return await Deployment.RunAsync(() => 
{
    var foo = GitLab.GetProject.Invoke(new()
    {
        PathWithNamespace = "foo/bar/baz",
    });

    var welcomeIssue = GitLab.GetProjectIssue.Invoke(new()
    {
        Project = foo.Apply(getProjectResult => getProjectResult.Id),
        Iid = 1,
    });

    return new Dictionary<string, object?>
    {
        ["welcomeIssueWebUrl"] = webUrl,
    };
});
Copy
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 com.pulumi.gitlab.inputs.GetProjectIssueArgs;
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 foo = GitlabFunctions.getProject(GetProjectArgs.builder()
            .pathWithNamespace("foo/bar/baz")
            .build());

        final var welcomeIssue = GitlabFunctions.getProjectIssue(GetProjectIssueArgs.builder()
            .project(foo.id())
            .iid(1)
            .build());

        ctx.export("welcomeIssueWebUrl", webUrl);
    }
}
Copy
variables:
  foo:
    fn::invoke:
      function: gitlab:getProject
      arguments:
        pathWithNamespace: foo/bar/baz
  welcomeIssue:
    fn::invoke:
      function: gitlab:getProjectIssue
      arguments:
        project: ${foo.id}
        iid: 1
outputs:
  welcomeIssueWebUrl: ${webUrl}
Copy

Using getProjectIssue

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 getProjectIssue(args: GetProjectIssueArgs, opts?: InvokeOptions): Promise<GetProjectIssueResult>
function getProjectIssueOutput(args: GetProjectIssueOutputArgs, opts?: InvokeOptions): Output<GetProjectIssueResult>
Copy
def get_project_issue(iid: Optional[int] = None,
                      project: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetProjectIssueResult
def get_project_issue_output(iid: Optional[pulumi.Input[int]] = None,
                      project: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetProjectIssueResult]
Copy
func LookupProjectIssue(ctx *Context, args *LookupProjectIssueArgs, opts ...InvokeOption) (*LookupProjectIssueResult, error)
func LookupProjectIssueOutput(ctx *Context, args *LookupProjectIssueOutputArgs, opts ...InvokeOption) LookupProjectIssueResultOutput
Copy

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

public static class GetProjectIssue 
{
    public static Task<GetProjectIssueResult> InvokeAsync(GetProjectIssueArgs args, InvokeOptions? opts = null)
    public static Output<GetProjectIssueResult> Invoke(GetProjectIssueInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetProjectIssueResult> getProjectIssue(GetProjectIssueArgs args, InvokeOptions options)
public static Output<GetProjectIssueResult> getProjectIssue(GetProjectIssueArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gitlab:index/getProjectIssue:getProjectIssue
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Iid This property is required. int
The internal ID of the project's issue.
Project This property is required. string
The name or ID of the project.
Iid This property is required. int
The internal ID of the project's issue.
Project This property is required. string
The name or ID of the project.
iid This property is required. Integer
The internal ID of the project's issue.
project This property is required. String
The name or ID of the project.
iid This property is required. number
The internal ID of the project's issue.
project This property is required. string
The name or ID of the project.
iid This property is required. int
The internal ID of the project's issue.
project This property is required. str
The name or ID of the project.
iid This property is required. Number
The internal ID of the project's issue.
project This property is required. String
The name or ID of the project.

getProjectIssue Result

The following output properties are available:

AssigneeIds List<int>
The IDs of the users to assign the issue to.
AuthorId int
The ID of the author of the issue. Use gitlab.User data source to get more information about the user.
ClosedAt string
When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
ClosedByUserId int
The ID of the user that closed the issue. Use gitlab.User data source to get more information about the user.
Confidential bool
Set an issue to be confidential.
CreatedAt string
When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
Description string
The description of an issue. Limited to 1,048,576 characters.
DiscussionLocked bool
Whether the issue is locked for discussions or not.
DiscussionToResolve string
The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
Downvotes int
The number of downvotes the issue has received.
DueDate string
The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
EpicId int
ID of the epic to add the issue to. Valid values are greater than or equal to 0.
EpicIssueId int
The ID of the epic issue.
ExternalId string
The external ID of the issue.
HumanTimeEstimate string
The human-readable time estimate of the issue.
HumanTotalTimeSpent string
The human-readable total time spent of the issue.
Id string
The provider-assigned unique ID for this managed resource.
Iid int
The internal ID of the project's issue.
IssueId int
The instance-wide ID of the issue.
IssueLinkId int
The ID of the issue link.
IssueType string
The type of issue. Valid values are: issue, incident, test_case.
Labels List<string>
The labels of an issue.
Links Dictionary<string, string>
The links of the issue.
MergeRequestToResolveDiscussionsOf int
The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
MergeRequestsCount int
The number of merge requests associated with the issue.
MilestoneId int
The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
MovedToId int
The ID of the issue that was moved to.
Project string
The name or ID of the project.
References Dictionary<string, string>
The references of the issue.
State string
The state of the issue. Valid values are: opened, closed.
Subscribed bool
Whether the authenticated user is subscribed to the issue or not.
TaskCompletionStatuses List<Pulumi.GitLab.Outputs.GetProjectIssueTaskCompletionStatus>
The task completion status. It's always a one element list.
TimeEstimate int
The time estimate of the issue.
Title string
The title of the issue.
TotalTimeSpent int
The total time spent of the issue.
UpdatedAt string
When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
Upvotes int
The number of upvotes the issue has received.
UserNotesCount int
The number of user notes on the issue.
WebUrl string
The web URL of the issue.
Weight int
The weight of the issue. Valid values are greater than or equal to 0.
AssigneeIds []int
The IDs of the users to assign the issue to.
AuthorId int
The ID of the author of the issue. Use gitlab.User data source to get more information about the user.
ClosedAt string
When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
ClosedByUserId int
The ID of the user that closed the issue. Use gitlab.User data source to get more information about the user.
Confidential bool
Set an issue to be confidential.
CreatedAt string
When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
Description string
The description of an issue. Limited to 1,048,576 characters.
DiscussionLocked bool
Whether the issue is locked for discussions or not.
DiscussionToResolve string
The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
Downvotes int
The number of downvotes the issue has received.
DueDate string
The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
EpicId int
ID of the epic to add the issue to. Valid values are greater than or equal to 0.
EpicIssueId int
The ID of the epic issue.
ExternalId string
The external ID of the issue.
HumanTimeEstimate string
The human-readable time estimate of the issue.
HumanTotalTimeSpent string
The human-readable total time spent of the issue.
Id string
The provider-assigned unique ID for this managed resource.
Iid int
The internal ID of the project's issue.
IssueId int
The instance-wide ID of the issue.
IssueLinkId int
The ID of the issue link.
IssueType string
The type of issue. Valid values are: issue, incident, test_case.
Labels []string
The labels of an issue.
Links map[string]string
The links of the issue.
MergeRequestToResolveDiscussionsOf int
The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
MergeRequestsCount int
The number of merge requests associated with the issue.
MilestoneId int
The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
MovedToId int
The ID of the issue that was moved to.
Project string
The name or ID of the project.
References map[string]string
The references of the issue.
State string
The state of the issue. Valid values are: opened, closed.
Subscribed bool
Whether the authenticated user is subscribed to the issue or not.
TaskCompletionStatuses []GetProjectIssueTaskCompletionStatus
The task completion status. It's always a one element list.
TimeEstimate int
The time estimate of the issue.
Title string
The title of the issue.
TotalTimeSpent int
The total time spent of the issue.
UpdatedAt string
When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
Upvotes int
The number of upvotes the issue has received.
UserNotesCount int
The number of user notes on the issue.
WebUrl string
The web URL of the issue.
Weight int
The weight of the issue. Valid values are greater than or equal to 0.
assigneeIds List<Integer>
The IDs of the users to assign the issue to.
authorId Integer
The ID of the author of the issue. Use gitlab.User data source to get more information about the user.
closedAt String
When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
closedByUserId Integer
The ID of the user that closed the issue. Use gitlab.User data source to get more information about the user.
confidential Boolean
Set an issue to be confidential.
createdAt String
When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
description String
The description of an issue. Limited to 1,048,576 characters.
discussionLocked Boolean
Whether the issue is locked for discussions or not.
discussionToResolve String
The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
downvotes Integer
The number of downvotes the issue has received.
dueDate String
The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
epicId Integer
ID of the epic to add the issue to. Valid values are greater than or equal to 0.
epicIssueId Integer
The ID of the epic issue.
externalId String
The external ID of the issue.
humanTimeEstimate String
The human-readable time estimate of the issue.
humanTotalTimeSpent String
The human-readable total time spent of the issue.
id String
The provider-assigned unique ID for this managed resource.
iid Integer
The internal ID of the project's issue.
issueId Integer
The instance-wide ID of the issue.
issueLinkId Integer
The ID of the issue link.
issueType String
The type of issue. Valid values are: issue, incident, test_case.
labels List<String>
The labels of an issue.
links Map<String,String>
The links of the issue.
mergeRequestToResolveDiscussionsOf Integer
The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
mergeRequestsCount Integer
The number of merge requests associated with the issue.
milestoneId Integer
The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
movedToId Integer
The ID of the issue that was moved to.
project String
The name or ID of the project.
references Map<String,String>
The references of the issue.
state String
The state of the issue. Valid values are: opened, closed.
subscribed Boolean
Whether the authenticated user is subscribed to the issue or not.
taskCompletionStatuses List<GetProjectIssueTaskCompletionStatus>
The task completion status. It's always a one element list.
timeEstimate Integer
The time estimate of the issue.
title String
The title of the issue.
totalTimeSpent Integer
The total time spent of the issue.
updatedAt String
When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
upvotes Integer
The number of upvotes the issue has received.
userNotesCount Integer
The number of user notes on the issue.
webUrl String
The web URL of the issue.
weight Integer
The weight of the issue. Valid values are greater than or equal to 0.
assigneeIds number[]
The IDs of the users to assign the issue to.
authorId number
The ID of the author of the issue. Use gitlab.User data source to get more information about the user.
closedAt string
When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
closedByUserId number
The ID of the user that closed the issue. Use gitlab.User data source to get more information about the user.
confidential boolean
Set an issue to be confidential.
createdAt string
When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
description string
The description of an issue. Limited to 1,048,576 characters.
discussionLocked boolean
Whether the issue is locked for discussions or not.
discussionToResolve string
The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
downvotes number
The number of downvotes the issue has received.
dueDate string
The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
epicId number
ID of the epic to add the issue to. Valid values are greater than or equal to 0.
epicIssueId number
The ID of the epic issue.
externalId string
The external ID of the issue.
humanTimeEstimate string
The human-readable time estimate of the issue.
humanTotalTimeSpent string
The human-readable total time spent of the issue.
id string
The provider-assigned unique ID for this managed resource.
iid number
The internal ID of the project's issue.
issueId number
The instance-wide ID of the issue.
issueLinkId number
The ID of the issue link.
issueType string
The type of issue. Valid values are: issue, incident, test_case.
labels string[]
The labels of an issue.
links {[key: string]: string}
The links of the issue.
mergeRequestToResolveDiscussionsOf number
The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
mergeRequestsCount number
The number of merge requests associated with the issue.
milestoneId number
The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
movedToId number
The ID of the issue that was moved to.
project string
The name or ID of the project.
references {[key: string]: string}
The references of the issue.
state string
The state of the issue. Valid values are: opened, closed.
subscribed boolean
Whether the authenticated user is subscribed to the issue or not.
taskCompletionStatuses GetProjectIssueTaskCompletionStatus[]
The task completion status. It's always a one element list.
timeEstimate number
The time estimate of the issue.
title string
The title of the issue.
totalTimeSpent number
The total time spent of the issue.
updatedAt string
When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
upvotes number
The number of upvotes the issue has received.
userNotesCount number
The number of user notes on the issue.
webUrl string
The web URL of the issue.
weight number
The weight of the issue. Valid values are greater than or equal to 0.
assignee_ids Sequence[int]
The IDs of the users to assign the issue to.
author_id int
The ID of the author of the issue. Use gitlab.User data source to get more information about the user.
closed_at str
When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
closed_by_user_id int
The ID of the user that closed the issue. Use gitlab.User data source to get more information about the user.
confidential bool
Set an issue to be confidential.
created_at str
When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
description str
The description of an issue. Limited to 1,048,576 characters.
discussion_locked bool
Whether the issue is locked for discussions or not.
discussion_to_resolve str
The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
downvotes int
The number of downvotes the issue has received.
due_date str
The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
epic_id int
ID of the epic to add the issue to. Valid values are greater than or equal to 0.
epic_issue_id int
The ID of the epic issue.
external_id str
The external ID of the issue.
human_time_estimate str
The human-readable time estimate of the issue.
human_total_time_spent str
The human-readable total time spent of the issue.
id str
The provider-assigned unique ID for this managed resource.
iid int
The internal ID of the project's issue.
issue_id int
The instance-wide ID of the issue.
issue_link_id int
The ID of the issue link.
issue_type str
The type of issue. Valid values are: issue, incident, test_case.
labels Sequence[str]
The labels of an issue.
links Mapping[str, str]
The links of the issue.
merge_request_to_resolve_discussions_of int
The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
merge_requests_count int
The number of merge requests associated with the issue.
milestone_id int
The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
moved_to_id int
The ID of the issue that was moved to.
project str
The name or ID of the project.
references Mapping[str, str]
The references of the issue.
state str
The state of the issue. Valid values are: opened, closed.
subscribed bool
Whether the authenticated user is subscribed to the issue or not.
task_completion_statuses Sequence[GetProjectIssueTaskCompletionStatus]
The task completion status. It's always a one element list.
time_estimate int
The time estimate of the issue.
title str
The title of the issue.
total_time_spent int
The total time spent of the issue.
updated_at str
When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
upvotes int
The number of upvotes the issue has received.
user_notes_count int
The number of user notes on the issue.
web_url str
The web URL of the issue.
weight int
The weight of the issue. Valid values are greater than or equal to 0.
assigneeIds List<Number>
The IDs of the users to assign the issue to.
authorId Number
The ID of the author of the issue. Use gitlab.User data source to get more information about the user.
closedAt String
When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
closedByUserId Number
The ID of the user that closed the issue. Use gitlab.User data source to get more information about the user.
confidential Boolean
Set an issue to be confidential.
createdAt String
When the issue was created. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z. Requires administrator or project/group owner rights.
description String
The description of an issue. Limited to 1,048,576 characters.
discussionLocked Boolean
Whether the issue is locked for discussions or not.
discussionToResolve String
The ID of a discussion to resolve. This fills out the issue with a default description and mark the discussion as resolved. Use in combination with mergerequesttoresolvediscussions_of.
downvotes Number
The number of downvotes the issue has received.
dueDate String
The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.
epicId Number
ID of the epic to add the issue to. Valid values are greater than or equal to 0.
epicIssueId Number
The ID of the epic issue.
externalId String
The external ID of the issue.
humanTimeEstimate String
The human-readable time estimate of the issue.
humanTotalTimeSpent String
The human-readable total time spent of the issue.
id String
The provider-assigned unique ID for this managed resource.
iid Number
The internal ID of the project's issue.
issueId Number
The instance-wide ID of the issue.
issueLinkId Number
The ID of the issue link.
issueType String
The type of issue. Valid values are: issue, incident, test_case.
labels List<String>
The labels of an issue.
links Map<String>
The links of the issue.
mergeRequestToResolveDiscussionsOf Number
The IID of a merge request in which to resolve all issues. This fills out the issue with a default description and mark all discussions as resolved. When passing a description or title, these values take precedence over the default values.
mergeRequestsCount Number
The number of merge requests associated with the issue.
milestoneId Number
The global ID of a milestone to assign issue. To find the milestone_id associated with a milestone, view an issue with the milestone assigned and use the API to retrieve the issue's details.
movedToId Number
The ID of the issue that was moved to.
project String
The name or ID of the project.
references Map<String>
The references of the issue.
state String
The state of the issue. Valid values are: opened, closed.
subscribed Boolean
Whether the authenticated user is subscribed to the issue or not.
taskCompletionStatuses List<Property Map>
The task completion status. It's always a one element list.
timeEstimate Number
The time estimate of the issue.
title String
The title of the issue.
totalTimeSpent Number
The total time spent of the issue.
updatedAt String
When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.
upvotes Number
The number of upvotes the issue has received.
userNotesCount Number
The number of user notes on the issue.
webUrl String
The web URL of the issue.
weight Number
The weight of the issue. Valid values are greater than or equal to 0.

Supporting Types

GetProjectIssueTaskCompletionStatus

CompletedCount This property is required. int
The number of tasks that are completed.
Count This property is required. int
The number of tasks.
CompletedCount This property is required. int
The number of tasks that are completed.
Count This property is required. int
The number of tasks.
completedCount This property is required. Integer
The number of tasks that are completed.
count This property is required. Integer
The number of tasks.
completedCount This property is required. number
The number of tasks that are completed.
count This property is required. number
The number of tasks.
completed_count This property is required. int
The number of tasks that are completed.
count This property is required. int
The number of tasks.
completedCount This property is required. Number
The number of tasks that are completed.
count This property is required. Number
The number of tasks.

Package Details

Repository
GitLab pulumi/pulumi-gitlab
License
Apache-2.0
Notes
This Pulumi package is based on the gitlab Terraform Provider.
GitLab v8.11.0 published on Friday, Apr 18, 2025 by Pulumi