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.
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.mdguide 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.gocalledexpires_at. Follow the logic ininternal/provider/resource_gitlab_group_share_group.goto see what that looks like. - Run
make reviewablebefore raising a merge request with your changes.
Edited by 🤖 GitLab Bot 🤖