terraform-provider-gitlab
terraform-provider-gitlab copied to clipboard
Group sub-groups, descendent groups, and projects, data sources
Feature Description
We would like to do some traversing of Gitlab sub-groups with Terraform. In order to be able to do this we would like to see gitlab_group_subgroups
, gitlab_group_descendent
, and gitlab_group_projects
calls added to the provider.
API calls are available for these and they would allow us to manage other resources associated with the Gitlab groups.
Do you want to implement this?
- [ ] I would like to implement this myself 👷
@MrMickS
API calls are available
I assume that you are looking for data sources:
-
gitlab_group_subgroups
-> https://docs.gitlab.com/ee/api/groups.html#list-a-groups-subgroups -
gitlab_group_descendent
-> https://docs.gitlab.com/ee/api/groups.html#list-a-groups-descendant-groups
Can you be a little bit more specific what gitlab_group_project
should be?
Maybe this already helps for the gitlab_group_project
:
- You can create projects in a group using the
namespace_id
attribute in thegitlab_project
resource. - You can create groups inside another group using, again, the [
namespace_id
](https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/group#:~:text=parent_id%20(Number)%20Id%20of%20the%20parent%20group%20(creates%20a%20nested%20group). - You can have a data source for projects in a group by using a combination of
gitlab_group
andgitlab_projects
data sources
I meant to put gitlab_group_projects
. What I'm looking for there is:
-
gitlab_group_projects
-> https://docs.gitlab.com/ee/api/groups.html#list-a-groups-projects
They are all one-to-one mappings to a Gitlab API call.
Would the mechanisms from the example here solve the gitlab_group_projects
use case?
Yes. Thanks, I didn't see that one.