Add Terraform module support to package protection rules

Problem to solve

The protected packages feature does not include support for the Terraform module registry. Customers who publish and consume Terraform modules through GitLab's built-in Terraform module registry cannot protect those modules using package protection rules, leaving them without a mechanism to restrict who can push to the Terraform module registry at the project level.

Proposal

Add terraform_module as a supported package type in package protection rules. This should include:

  • Support in the UI dropdown for package type selection when creating a protection rule
  • Support in the REST and GraphQL APIs
  • Support in the Terraform provider resource (see related issue for Terraform provider)

Who is affected?

Customers using GitLab's Terraform module registry who need to restrict push access to modules via protection rules.

Edited by 🤖 GitLab Bot 🤖