GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves specific Terraform module information from the GitLab Terraform Registry API. It is useful for users who want to programmatically access details about a particular Terraform module version hosted on GitLab. For example, it can be used in automation workflows to fetch module metadata for infrastructure as code management or validation.

Use Case Examples

  1. Fetch details of a Terraform module version by specifying the module namespace, name, system, and version.
  2. Automate retrieval of module metadata to integrate with CI/CD pipelines for Terraform deployments.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use, hidden unless Skip Authentication is false.
baseUrl The base URL of the GitLab instance to send the request to, defaulting to https://gitlab.com.
Method HTTP method to use for the request, default is GET.
Query Parameters Parameters sent in the query string of the request.
Path Parameters Parameters included in the URL path to specify the module.

Output

JSON

  • id - The unique identifier of the Terraform module.
  • name - The name of the Terraform module.
  • namespace - The namespace or group the module belongs to.
  • version - The version of the Terraform module.
  • description - Description of the Terraform module.
  • created_at - Timestamp when the module version was created.
  • updated_at - Timestamp when the module version was last updated.
  • downloads_count - Number of times the module version has been downloaded.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the module_namespace, module_name, module_system, and module_version parameters are correctly specified; missing or incorrect values will cause the API request to fail.
  • If authentication is required, verify that the GitLab API credential is correctly configured and has the necessary permissions.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure it is correct.
  • Common error messages include 404 Not Found if the module or version does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion