GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves version information for a specific Terraform module from the GitLab Terraform Registry API. It is useful for users who want to programmatically access details about different versions of a Terraform module hosted on GitLab, such as for automation, auditing, or integration purposes. For example, a DevOps engineer might use this node to fetch all available versions of a Terraform module before deploying infrastructure.

Use Case Examples

  1. Fetch all versions of a Terraform module named 'example-module' under the namespace 'example-group' for a specific module system.
  2. Automate the retrieval of module version data to integrate with CI/CD pipelines.

Properties

Name Meaning
Skip Authentication Whether to skip authentication when making the API request.
Authentication The authentication method used for the API request, typically an API key or token.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request.
Path Parameters Parameters used to specify the Terraform module namespace, module name, and module system in the API request path.

Output

JSON

  • versions - List of versions available for the specified Terraform module.
  • module_namespace - The namespace (group ID or slug) of the Terraform module.
  • module_name - The name of the Terraform module.
  • module_system - The system type of the Terraform module.

Dependencies

  • GitLab API authentication token or API key

Troubleshooting

  • Ensure the module_namespace, module_name, and module_system path parameters are correctly set; incorrect values will result in API errors or empty responses.
  • If authentication is enabled, verify that the GitLab API token is valid and has the necessary permissions to access the Terraform Registry.
  • Check the baseUrl if using a self-hosted GitLab instance; the default is https://gitlab.com.
  • Common error messages include 404 Not Found if the module does not exist, or 401 Unauthorized if authentication fails.

Links

Discussion