-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Resource:
gitlab_project_issue_board
Closes: #772
- Loading branch information
1 parent
1b2d42b
commit eb3515e
Showing
7 changed files
with
881 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "gitlab_project_issue_board Resource - terraform-provider-gitlab" | ||
subcategory: "" | ||
description: |- | ||
The gitlab_project_issue_board resource allows to manage the lifecycle of a Project Issue Board. | ||
~> NOTE: If the board lists are changed all lists will be recreated. | ||
Upstream API: GitLab REST API docs https://docs.gitlab.com/ee/api/boards.html | ||
--- | ||
|
||
# gitlab_project_issue_board (Resource) | ||
|
||
The `gitlab_project_issue_board` resource allows to manage the lifecycle of a Project Issue Board. | ||
|
||
~> **NOTE:** If the board lists are changed all lists will be recreated. | ||
|
||
**Upstream API**: [GitLab REST API docs](https://docs.gitlab.com/ee/api/boards.html) | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "gitlab_project" "example" { | ||
name = "example project" | ||
description = "Lorem Ipsum" | ||
visibility_level = "public" | ||
} | ||
resource "gitlab_user" "example" { | ||
name = "example" | ||
username = "example" | ||
email = "[email protected]" | ||
password = "example1$$$" | ||
} | ||
resource "gitlab_project_membership" "example" { | ||
project_id = gitlab_project.example.id | ||
user_id = gitlab_user.example.id | ||
access_level = "developer" | ||
} | ||
resource "gitlab_project_milestone" "example" { | ||
project = gitlab_project.example.id | ||
title = "m1" | ||
} | ||
resource "gitlab_project_issue_board" "this" { | ||
project = gitlab_project.example.id | ||
name = "Test Issue Board" | ||
lists { | ||
assignee_id = gitlab_user.example.id | ||
} | ||
lists { | ||
milestone_id = gitlab_project_milestone.example.milestone_id | ||
} | ||
depends_on = [ | ||
gitlab_project_membership.example | ||
] | ||
} | ||
resource "gitlab_project_issue_board" "list_syntax" { | ||
project = gitlab_project.example.id | ||
name = "Test Issue Board with list syntax" | ||
lists = [ | ||
{ | ||
assignee_id = gitlab_user.example.id | ||
}, | ||
{ | ||
milestone_id = gitlab_project_milestone.example.milestone_id | ||
} | ||
] | ||
depends_on = [ | ||
gitlab_project_membership.example | ||
] | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) The name of the board. | ||
- `project` (String) The ID or full path of the project maintained by the authenticated user. | ||
|
||
### Optional | ||
|
||
- `assignee_id` (Number) The assignee the board should be scoped to. Requires a GitLab EE license. | ||
- `labels` (Set of String) The list of label names which the board should be scoped to. Requires a GitLab EE license. | ||
- `lists` (Block List) The list of issue board lists (see [below for nested schema](#nestedblock--lists)) | ||
- `milestone_id` (Number) The milestone the board should be scoped to. Requires a GitLab EE license. | ||
- `weight` (Number) The weight range from 0 to 9, to which the board should be scoped to. Requires a GitLab EE license. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
<a id="nestedblock--lists"></a> | ||
### Nested Schema for `lists` | ||
|
||
Optional: | ||
|
||
- `assignee_id` (Number) The ID of the assignee the list should be scoped to. Requires a GitLab EE license. | ||
- `iteration_id` (Number) The ID of the iteration the list should be scoped to. Requires a GitLab EE license. | ||
- `label_id` (Number) The ID of the label the list should be scoped to. Requires a GitLab EE license. | ||
- `milestone_id` (Number) The ID of the milestone the list should be scoped to. Requires a GitLab EE license. | ||
|
||
Read-Only: | ||
|
||
- `id` (Number) The ID of the list | ||
- `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. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# You can import this resource with an id made up of `{project-id}:{issue-board-id}`, e.g. | ||
terraform import gitlab_project_issue_board.kanban 42:1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# You can import this resource with an id made up of `{project-id}:{issue-board-id}`, e.g. | ||
terraform import gitlab_project_issue_board.kanban 42:1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
resource "gitlab_project" "example" { | ||
name = "example project" | ||
description = "Lorem Ipsum" | ||
visibility_level = "public" | ||
} | ||
|
||
resource "gitlab_user" "example" { | ||
name = "example" | ||
username = "example" | ||
email = "[email protected]" | ||
password = "example1$$$" | ||
} | ||
|
||
resource "gitlab_project_membership" "example" { | ||
project_id = gitlab_project.example.id | ||
user_id = gitlab_user.example.id | ||
access_level = "developer" | ||
} | ||
|
||
resource "gitlab_project_milestone" "example" { | ||
project = gitlab_project.example.id | ||
title = "m1" | ||
} | ||
|
||
resource "gitlab_project_issue_board" "this" { | ||
project = gitlab_project.example.id | ||
name = "Test Issue Board" | ||
|
||
lists { | ||
assignee_id = gitlab_user.example.id | ||
} | ||
|
||
lists { | ||
milestone_id = gitlab_project_milestone.example.milestone_id | ||
} | ||
|
||
depends_on = [ | ||
gitlab_project_membership.example | ||
] | ||
} | ||
|
||
resource "gitlab_project_issue_board" "list_syntax" { | ||
project = gitlab_project.example.id | ||
name = "Test Issue Board with list syntax" | ||
|
||
lists = [ | ||
{ | ||
assignee_id = gitlab_user.example.id | ||
}, | ||
{ | ||
milestone_id = gitlab_project_milestone.example.milestone_id | ||
} | ||
] | ||
|
||
depends_on = [ | ||
gitlab_project_membership.example | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.