Return "public_email" for gitlab_user data source
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
The value is supported by the API if you're a reuglar user: https://docs.gitlab.com/api/users/#retrieve-a-single-user-as-a-regular-user
But the respective data source does not return/expose this value: https://gitlab.com/gitlab-org/terraform-provider-gitlab/-/blob/main/internal/provider/datasource_gitlab_user.go?ref_type=heads#L38
Provider Version is 18.8.2
Implementation Guide
- Follow the
CONTRIBUTING.mdguide to set up your local development environment. - Clone the community fork of this project.
- In
internal/provider/datasource_gitlab_user.go, add a newComputedattribute calledpublic_email. Set the value in the data struct from the API response. - Update the description of the existing
emailattribute to make it clear that this is for searching and does not necessarily represent the public email.
Edited by 🤖 GitLab Bot 🤖