Skip to content

Add instance-wide Terraform Module Explorer view at /explore/terraform

Problem to Solve

GitLab lacks a centralized view for discovering Terraform modules across an instance. Currently, users must navigate through deeply nested group structures to find modules, making it challenging to discover and reuse existing modules. This is particularly problematic because GitLab's Terraform module naming convention uses top-level group namespacing, obscuring where modules live in the group hierarchy.

For example:

groupA/terraform-null-example-module1
groupA/subgroupB/terraform-null-example-module2
groupA/subgroupC/nestedgroupC/deeplynestedC/terraform-null-example-module3

All appear as:

source = "gitlab.<example>.com/groupA/example-module{1,2,3}/null"

Making it difficult for developers to locate the actual module source for contributions.

Intended Users

  • DevOps engineers looking to reuse existing Terraform modules
  • Infrastructure developers seeking to discover available modules
  • Platform teams maintaining infrastructure modules
  • Contributors looking to collaborate on existing modules

Proposal

Add a new /explore/terraform endpoint that provides:

  • A searchable, filterable view of all published Terraform modules in the instance
  • Similar UX to registry.terraform.io and /explore/catalog
  • Display of key module metadata (description, version, usage stats)
  • Clear indication of actual module location in group hierarchy
  • Links to module documentation and source

This aligns with existing GitLab explore features while addressing the specific needs of Terraform module discovery.

Further Details

The view should include:

  • Search functionality
  • Filtering by provider type
  • Module versioning information
  • Usage statistics
  • Clear path to actual module location
  • README preview
  • Quick copy of module source string

Value

This feature will:

  • Increase module reuse across teams
  • Reduce duplicate module development
  • Improve collaboration on existing modules
  • Save developer time in finding appropriate modules
  • Encourage standardization through module discovery

Acceptance Criteria

  1. Discovery Interface
    • A new /explore/terraform endpoint is accessible to authenticated users
      • Page displays a grid/list of all published Terraform modules in the instance
      • Each module card shows:
        • Module name
        • Description
        • Latest version
        • Provider type
        • Actual path in group hierarchy
        • Quick copy button for module source string
  2. Search & Filter
    • Users can search modules by name, description, and provider
      • Users can filter modules by:
        • Provider type (AWS, GCP, Azure, etc.)
        • Group path
        • Latest version status
  3. Module Details
    • Clicking a module shows detailed view with:
      • README content
      • All available versions
      • Usage instructions
      • Link to actual module location
      • Module dependencies
      • Usage statistics (if available)
  4. Performance & Scale
    • Page loads within 3 seconds for instances with up to 1000 modules
      • Search results update within 1 second
      • Pagination implemented for large module collections
  5. Access Control
    • Only modules from groups/projects the user has access to are displayed
      • Private modules are only visible to users with appropriate permissions
  6. Documentation
    • Feature is documented in GitLab docs
      • Documentation includes examples of how to navigate and use the interface
Edited by 🤖 GitLab Bot 🤖