GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves a specific Terraform module version from the GitLab Terraform Registry API. It is useful for users who want to programmatically access detailed information about a particular Terraform module version hosted on GitLab, such as module metadata or version details. Practical examples include automating infrastructure as code workflows, integrating Terraform module data into CI/CD pipelines, or auditing module versions.

Use Case Examples

  1. Fetch details of a Terraform module version by specifying the module namespace, name, system, and version to automate infrastructure deployment processes.
  2. Use the node to query module version information as part of a compliance check in a DevOps pipeline.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request.
Authentication The authentication method used for the API request, hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance to send the request to.
Method The HTTP method to use for the request.
Query Parameters Query parameters for the request, including the required module_version parameter.
Path Parameters Path parameters for the request, including module_namespace, module_name, and module_system.

Output

JSON

  • module_namespace - The namespace (group ID or slug) of the Terraform module.
  • module_name - The name of the Terraform module.
  • module_system - The system of the Terraform module.
  • module_version - The version of the Terraform module.
  • module_details - Detailed information about the specified Terraform module version returned from the API.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the module_namespace, module_name, module_system, and module_version parameters are correctly specified and not empty, as they are required for the API call.
  • If authentication is enabled, verify that the GitLab API credentials are valid and have the necessary permissions to access the Terraform Registry API.
  • Check the baseUrl parameter to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.
  • Common error messages may include 404 Not Found if the specified module or version does not exist, or 401 Unauthorized if authentication fails. Verify parameters and credentials accordingly.

Links

Discussion