|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "gitlab_project_issue_board Resource - terraform-provider-gitlab" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + The gitlab_project_issue_board resource allows to manage the lifecycle of a Project Issue Board. |
| 7 | + ~> NOTE: If the board lists are changed all lists will be recreated. |
| 8 | + Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/boards.html |
| 9 | +--- |
| 10 | + |
| 11 | +# gitlab_project_issue_board (Resource) |
| 12 | + |
| 13 | +The `gitlab_project_issue_board` resource allows to manage the lifecycle of a Project Issue Board. |
| 14 | + |
| 15 | +~> **NOTE:** If the board lists are changed all lists will be recreated. |
| 16 | + |
| 17 | +**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/boards.html) |
| 18 | + |
| 19 | +## Example Usage |
| 20 | + |
| 21 | +```terraform |
| 22 | +resource "gitlab_project" "example" { |
| 23 | + name = "example project" |
| 24 | + description = "Lorem Ipsum" |
| 25 | + visibility_level = "public" |
| 26 | +} |
| 27 | +
|
| 28 | +resource "gitlab_user" "example" { |
| 29 | + name = "example" |
| 30 | + username = "example" |
| 31 | + |
| 32 | + password = "example1$$$" |
| 33 | +} |
| 34 | +
|
| 35 | +resource "gitlab_project_membership" "example" { |
| 36 | + project_id = gitlab_project.example.id |
| 37 | + user_id = gitlab_user.example.id |
| 38 | + access_level = "developer" |
| 39 | +} |
| 40 | +
|
| 41 | +resource "gitlab_project_milestone" "example" { |
| 42 | + project = gitlab_project.example.id |
| 43 | + title = "m1" |
| 44 | +} |
| 45 | +
|
| 46 | +resource "gitlab_project_issue_board" "this" { |
| 47 | + project = gitlab_project.example.id |
| 48 | + name = "Test Issue Board" |
| 49 | +
|
| 50 | + lists { |
| 51 | + assignee_id = gitlab_user.example.id |
| 52 | + } |
| 53 | +
|
| 54 | + lists { |
| 55 | + milestone_id = gitlab_project_milestone.example.milestone_id |
| 56 | + } |
| 57 | +
|
| 58 | + depends_on = [ |
| 59 | + gitlab_project_membership.example |
| 60 | + ] |
| 61 | +} |
| 62 | +
|
| 63 | +resource "gitlab_project_issue_board" "list_syntax" { |
| 64 | + project = gitlab_project.example.id |
| 65 | + name = "Test Issue Board with list syntax" |
| 66 | +
|
| 67 | + lists = [ |
| 68 | + { |
| 69 | + assignee_id = gitlab_user.example.id |
| 70 | + }, |
| 71 | + { |
| 72 | + milestone_id = gitlab_project_milestone.example.milestone_id |
| 73 | + } |
| 74 | + ] |
| 75 | +
|
| 76 | + depends_on = [ |
| 77 | + gitlab_project_membership.example |
| 78 | + ] |
| 79 | +} |
| 80 | +``` |
| 81 | + |
| 82 | +<!-- schema generated by tfplugindocs --> |
| 83 | +## Schema |
| 84 | + |
| 85 | +### Required |
| 86 | + |
| 87 | +- `name` (String) The name of the board. |
| 88 | +- `project` (String) The ID or full path of the project maintained by the authenticated user. |
| 89 | + |
| 90 | +### Optional |
| 91 | + |
| 92 | +- `assignee_id` (Number) The assignee the board should be scoped to. Requires a GitLab EE license. |
| 93 | +- `labels` (Set of String) The list of label names which the board should be scoped to. Requires a GitLab EE license. |
| 94 | +- `lists` (Block List) The list of issue board lists (see [below for nested schema](#nestedblock--lists)) |
| 95 | +- `milestone_id` (Number) The milestone the board should be scoped to. Requires a GitLab EE license. |
| 96 | +- `weight` (Number) The weight range from 0 to 9, to which the board should be scoped to. Requires a GitLab EE license. |
| 97 | + |
| 98 | +### Read-Only |
| 99 | + |
| 100 | +- `id` (String) The ID of this resource. |
| 101 | + |
| 102 | +<a id="nestedblock--lists"></a> |
| 103 | +### Nested Schema for `lists` |
| 104 | + |
| 105 | +Optional: |
| 106 | + |
| 107 | +- `assignee_id` (Number) The ID of the assignee the list should be scoped to. Requires a GitLab EE license. |
| 108 | +- `iteration_id` (Number) The ID of the iteration the list should be scoped to. Requires a GitLab EE license. |
| 109 | +- `label_id` (Number) The ID of the label the list should be scoped to. Requires a GitLab EE license. |
| 110 | +- `milestone_id` (Number) The ID of the milestone the list should be scoped to. Requires a GitLab EE license. |
| 111 | + |
| 112 | +Read-Only: |
| 113 | + |
| 114 | +- `id` (Number) The ID of the list |
| 115 | +- `position` (Number) The position of the list within the board. The position for the list is based on the its position in the `lists` array. |
| 116 | + |
| 117 | +## Import |
| 118 | + |
| 119 | +Import is supported using the following syntax: |
| 120 | + |
| 121 | +```shell |
| 122 | +# You can import this resource with an id made up of `{project-id}:{issue-board-id}`, e.g. |
| 123 | +terraform import gitlab_project_issue_board.kanban 42:1 |
| 124 | +``` |
0 commit comments