New Resource: `gitlab_project_issue_board`
This PR introduces the new resource gitlab_project_issue_board (as requested in #772 (closed)).
A simple example may look like this:
resource "gitlab_project_issue_board" "this" {
project = gitlab_project.example.id
name = "Test Issue Board"
lists {
label_id = 1
}
lists {
assignee_id = 1
}
lists {
milestone_id = 1
}
}
This resource is (probably) the first one where I've decided to go with sub resources - the lists instead of having a separate resource gitlab_project_issue_board_list. I decided to go with this approach to make it easier to have consistent positioning of the lists - which is taken care of by the resource itself based on the position the list appears in the attribute lists in the config.
However, this makes implementation a little bit "unusual" and even "cumbersome" because nested Schemas are not very well supported, e.g. features like ExactlyOneOf or ConflictsWith are simply not supported. There is also only one CRUD trigger for the main resource, thus the lists have to be handled there - more or less manually. In the board lists case this is not to dramatic, because we just create the list in the create hook (surprise lists attribute. The deletion doesn't matter, because if the board gets deleted, the lists are deleted.
Another decision point was the naming of the attribute lists. The above example screams for the attribute to be named lists. BUT, I foresee that people want to create standardized boards in projects, thus they most likely want to use it like this:
resource "gitlab_project_issue_board" "this" {
project = gitlab_project.example.id
name = "Test Issue Board"
lists = var.board_lists
}
... where var.board_lists is a standard set of lists. They may also use for_each for which it would be an unfortunate naming again. There are no aliasing, so we couldn't do that.
What we could do, is duplicate the lists attribute to a list attribute and mark it was ConflictsWith: <the other one>.
@PatrickRice-KSC @armsnyder any thoughts on this? Ideas?
This PR is currently blocked by:
Closes: #772 (closed)