|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "gitlab_project_merge_request Data Source - terraform-provider-gitlab" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + The gitlab_project_merge_request data source retrieves |
| 7 | + information about a single merge request related to a specific project. |
| 8 | + Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/merge_requests.html#get-single-mr |
| 9 | +--- |
| 10 | + |
| 11 | +# gitlab_project_merge_request (Data Source) |
| 12 | + |
| 13 | +The `gitlab_project_merge_request` data source retrieves |
| 14 | +information about a single merge request related to a specific project. |
| 15 | + |
| 16 | +**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/merge_requests.html#get-single-mr) |
| 17 | + |
| 18 | +## Example Usage |
| 19 | + |
| 20 | +```terraform |
| 21 | +data "gitlab_project_merge_request" "by_project_id" { |
| 22 | + project = "123" |
| 23 | + iid = 456 |
| 24 | +} |
| 25 | +
|
| 26 | +data "gitlab_project_merge_request" "by_project_name" { |
| 27 | + project = "company/group/project1" |
| 28 | + iid = 3 |
| 29 | +} |
| 30 | +``` |
| 31 | + |
| 32 | +<!-- schema generated by tfplugindocs --> |
| 33 | +## Schema |
| 34 | + |
| 35 | +### Required |
| 36 | + |
| 37 | +- `iid` (Number) The unique project level ID of the merge request. |
| 38 | +- `project` (String) The ID or path of the project. |
| 39 | + |
| 40 | +### Read-Only |
| 41 | + |
| 42 | +- `assignee` (Attributes) First assignee of the merge request. (see [below for nested schema](#nestedatt--assignee)) |
| 43 | +- `assignees` (Attributes List) Assignees of the merge request. (see [below for nested schema](#nestedatt--assignees)) |
| 44 | +- `author` (Attributes) User who created this merge request. (see [below for nested schema](#nestedatt--author)) |
| 45 | +- `blocking_discussions_resolved` (Boolean) Indicates if all discussions are resolved only if all are |
| 46 | +required before merge request can be merged. |
| 47 | +- `changes_count` (String) Number of changes made on the merge request. Empty when the |
| 48 | +merge request is created, and populates asynchronously. |
| 49 | +- `closed_at` (String) Timestamp of when the merge request was closed. |
| 50 | +- `closed_by` (Attributes) User who closed this merge request. (see [below for nested schema](#nestedatt--closed_by)) |
| 51 | +- `created_at` (String) Timestamp of when the merge request was created. |
| 52 | +- `id` (Number) The unique instance level ID of the merge request. |
| 53 | + |
| 54 | +<a id="nestedatt--assignee"></a> |
| 55 | +### Nested Schema for `assignee` |
| 56 | + |
| 57 | +Read-Only: |
| 58 | + |
| 59 | +- `avatar_url` (String) A link to the user's avatar image. |
| 60 | +- `id` (Number) The internal ID number of the user. |
| 61 | +- `name` (String) The name of the user. |
| 62 | +- `state` (String) The state of the user account. |
| 63 | +- `username` (String) The username of the user. |
| 64 | +- `web_url` (String) A link to the user's profile page. |
| 65 | + |
| 66 | + |
| 67 | +<a id="nestedatt--assignees"></a> |
| 68 | +### Nested Schema for `assignees` |
| 69 | + |
| 70 | +Read-Only: |
| 71 | + |
| 72 | +- `avatar_url` (String) A link to the user's avatar image. |
| 73 | +- `id` (Number) The internal ID number of the user. |
| 74 | +- `name` (String) The name of the user. |
| 75 | +- `state` (String) The state of the user account. |
| 76 | +- `username` (String) The username of the user. |
| 77 | +- `web_url` (String) A link to the user's profile page. |
| 78 | + |
| 79 | + |
| 80 | +<a id="nestedatt--author"></a> |
| 81 | +### Nested Schema for `author` |
| 82 | + |
| 83 | +Read-Only: |
| 84 | + |
| 85 | +- `avatar_url` (String) A link to the user's avatar image. |
| 86 | +- `id` (Number) The internal ID number of the user. |
| 87 | +- `name` (String) The name of the user. |
| 88 | +- `state` (String) The state of the user account. |
| 89 | +- `username` (String) The username of the user. |
| 90 | +- `web_url` (String) A link to the user's profile page. |
| 91 | + |
| 92 | + |
| 93 | +<a id="nestedatt--closed_by"></a> |
| 94 | +### Nested Schema for `closed_by` |
| 95 | + |
| 96 | +Read-Only: |
| 97 | + |
| 98 | +- `avatar_url` (String) A link to the user's avatar image. |
| 99 | +- `id` (Number) The internal ID number of the user. |
| 100 | +- `name` (String) The name of the user. |
| 101 | +- `state` (String) The state of the user account. |
| 102 | +- `username` (String) The username of the user. |
| 103 | +- `web_url` (String) A link to the user's profile page. |
0 commit comments