gitlab_project_share_group resource is missing expires_at property

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

  • Collaborate/take over this issue

Bug Report

The gitlab_project_share_group resource currently allows sharing a project with a group, but it lacks the ability to set an expiration date (expires_at). This functionality is supported by the GitLab API and is already present in the sibling resource gitlab_group_share_group.

https://docs.gitlab.com/18.7/api/projects/#share-a-project-with-a-group

Relevant Terraform Configuration

resource "gitlab_project_share_group" "test" {
  project      = "12345"
  group_id     = 1337
  group_access = "guest"
  expires_at   = "2099-01-01" # Error: Unsupported argument
}

Relevant Terraform Command

terraform plan

Additional Details

  • GitLab Terraform Provider Version: 18.7.0

Implementation Guide

  • Read the CONTRIBUTING.md guide for setting up your local development environment and clone the community fork of this project.
  • Add a new attribute to internal/provider/sdk/resource_gitlab_project_share_group.go called expires_at. Follow the logic in internal/provider/resource_gitlab_group_share_group.go to see what that looks like.
  • Run make reviewable before raising a merge request with your changes.
Edited Jan 08, 2026 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading