Return "public_email" for gitlab_user data source

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Collaborate/take over this issue

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.md guide to set up your local development environment.
  • Clone the community fork of this project.
  • In internal/provider/datasource_gitlab_user.go, add a new Computed attribute called public_email. Set the value in the data struct from the API response.
  • Update the description of the existing email attribute to make it clear that this is for searching and does not necessarily represent the public email.
Edited Feb 21, 2026 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading