Add is_auditor flag to gitlab_user

What does this MR do?

Adds a new optional is_auditor boolean attribute to the gitlab_user resource, allowing users to designate GitLab users as auditors via Terraform.

Closes #6843

Implementation notes

The is_auditor attribute follows the same pattern as the existing is_admin and is_external flags:

  • Create: Mapped to auditor in CreateUserOptions (already supported by client-go)
  • Read: Mapped from User.IsAuditor (already supported by client-go)
  • Update: The ModifyUserOptions struct in client-go does not yet expose the auditor field, even though the GitLab REST API supports it (https://docs.gitlab.com/api/users/#modify-a-user). As a workaround, the update path uses a raw PUT /users/:id call via client.NewRequest + client.Do. Once the client-go library exposes Auditor in ModifyUserOptions, this workaround can be replaced with a standard options.Auditor = ... assignment.

Checklist

  • Added is_auditor to schema (optional bool, default false)
  • Create path sends auditor parameter
  • Read path reads is_auditor from API response
  • Update path handles is_auditor changes
  • Acceptance tests: create with is_auditor = true, toggle to false, import verification
  • Example resource updated
  • Documentation auto-generated via make generate

Closes #6843

Merge request reports

Loading