Skip to content

Terraform module registry runbook

The Terraform Module Registry allows you to publish and share Terraform modules within your GitLab instance.

Note: For general Package Registry architecture, troubleshooting, and operational procedures, see the main Package Registry runbook.

  • Project level: /api/v4/projects/:id/packages/terraform/modules
  • Namespace level: /api/v4/packages/terraform/modules/v1/:module_namespace/

Summary

Terraform cannot resolve module addresses due to naming constraints or version issues.

Symptoms:

  • Error: “Invalid version constraint”
  • Error: “Module not found”
  • Error: “Cannot apply a version constraint to module because it has a non Registry URL”

Steps to Diagnose:

  1. Check module naming conventions (namespace, module name, system)
  2. Verify namespace doesn’t contain unsupported characters (dots)
  3. Check version format and constraints

Troubleshooting:

Resolution:

  • Avoid dots in namespace names
  • Use proper semantic versioning

References