Skip to content

List provisioned users api is missing

Created by: vl-shopback

Feature Description

List provisioned users api is missing

https://docs.gitlab.com/ee/api/groups.html#list-provisioned-users

https://github.com/xanzy/go-gitlab/blob/master/groups.go#L588

Do you want to implement this?

  • I would like to implement this myself 👷

Implementation Notes

This resource will create a new data source under internal/provider, likely datasource_gitlab_group_provisioned_users.go. Similar to Creating a new Resource, this will require a new data source Struct and schema to be defined.

This new data source will have one required attribute, the id attribute (which should likely be group_id to be clear to end users that it's the group ID that's expected). All other attributes under the API definition can be added as optional as well. created_after and created_before should be ISO timestamps to match other implemented dates.

In addition to the required attributes, there should be one Users attribute of the data source struct that accepts a slice of users. You can see an example of how to implement this in the datasource_gitlab_project_protected_branches struct. This should store the returned user attributes for this resource.

Since this is a data source and not a new resource, the Read function is the only function that needs to be implemented. It should call the provisioned users API, parse the response into the User object struct, and store it into state.

Edited by Patrick Rice