The gitlab_project_issue
resource allows to manage the lifecycle of an issue within a project.
Upstream API: GitLab API docs
resource "gitlab_project" "foo" {
name = "example project"
description = "Lorem Ipsum"
visibility_level = "public"
}
resource "gitlab_project_issue" "welcome_issue" {
project = gitlab_project.foo.id
title = "Welcome!"
description = <<EOT
Welcome to the ${gitlab_project.foo.name} project!
EOT
discussion_locked = true
}
output "welcome_issue_web_url" {
value = data.gitlab_project_issue.web_url
}
Welcome to the ${gitlab_project.foo.name} project!
EOT
discussion_locked = true
}
output "welcome_issue_web_url" {
value = data.gitlab_project_issue.web_url
}
project
(String) The name or ID of the project.title
(String) The title of the issue.assignee_ids
(Set of Number) The IDs of the users to assign the issue to.confidential
(Boolean) Set an issue to be confidential.created_at
(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.delete_on_destroy
(Boolean) Whether the issue is deleted instead of closed during destroy.description
(String) The description of an issue. Limited to 1,048,576 characters.discussion_locked
(Boolean) Whether the issue is locked for discussions or not.discussion_to_resolve
(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 merge_request_to_resolve_discussions_of.due_date
(String) The due date. Date time string in the format YYYY-MM-DD, for example 2016-03-11.epic_issue_id
(Number) The ID of the epic issue.iid
(Number) The internal ID of the project's issue.issue_type
(String) The type of issue. Valid values are: issue
, incident
, test_case
.labels
(Set of String) The labels of an issue.merge_request_to_resolve_discussions_of
(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.milestone_id
(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.state
(String) The state of the issue. Valid values are: opened
, closed
.updated_at
(String) When the issue was updated. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.weight
(Number) The weight of the issue. Valid values are greater than or equal to 0.author_id
(Number) The ID of the author of the issue. Use gitlab_user
data source to get more information about the user.closed_at
(String) When the issue was closed. Date time string, ISO 8601 formatted, for example 2016-03-11T03:45:40Z.closed_by_user_id
(Number) The ID of the user that closed the issue. Use gitlab_user
data source to get more information about the user.downvotes
(Number) The number of downvotes the issue has received.epic_id
(Number) ID of the epic to add the issue to. Valid values are greater than or equal to 0.external_id
(String) The external ID of the issue.human_time_estimate
(String) The human-readable time estimate of the issue.human_total_time_spent
(String) The human-readable total time spent of the issue.id
(String) The ID of this resource.issue_id
(Number) The instance-wide ID of the issue.issue_link_id
(Number) The ID of the issue link.links
(Map of String) The links of the issue.merge_requests_count
(Number) The number of merge requests associated with the issue.moved_to_id
(Number) The ID of the issue that was moved to.references
(Map of String) The references of the issue.subscribed
(Boolean) Whether the authenticated user is subscribed to the issue or not.task_completion_status
(List of Object) The task completion status. It's always a one element list. (see below for nested schema)time_estimate
(Number) The time estimate of the issue.total_time_spent
(Number) The total time spent of the issue.upvotes
(Number) The number of upvotes the issue has received.user_notes_count
(Number) The number of user notes on the issue.web_url
(String) The web URL of the issue.task_completion_status
Read-Only:
completed_count
(Number)count
(Number)Import is supported using the following syntax:
# You can import this resource with an id made up of `{project-id}:{issue-id}`, e.g.
terraform import gitlab_project_issue.welcome_issue 42:1