GitLab API

GitlabTool

Actions1000

Overview

This node operation retrieves specific Terraform module information from a GitLab project's Terraform registry using the GitLab API. It is useful for automating infrastructure management workflows by programmatically accessing module details such as version and system type. For example, it can be used to fetch module metadata for deployment automation or version tracking in CI/CD pipelines.

Use Case Examples

  1. Fetching a Terraform module's details by specifying the project ID, module name, module system (e.g., aws), and module version.
  2. Automating infrastructure updates by retrieving the latest module version information from a GitLab Terraform registry.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication. Hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method HTTP method to use for the API request, defaulting to GET.
Query Parameters Parameters sent as query strings in the API request, including module_version (required) and terraform-get (optional flag for Terraform get redirection).
Path Parameters Parameters included in the API request path, including id (project ID or full path), module_name, and module_system.

Output

JSON

  • id - The ID or full path of the GitLab project.
  • module_name - The name of the Terraform module.
  • module_system - The system type of the Terraform module (e.g., aws).
  • module_version - The version of the Terraform module.
  • terraform-get - Flag indicating Terraform get redirection.
  • response - The JSON response from the GitLab API containing the module details.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the project ID or full path is correct to avoid 404 Not Found errors.
  • Verify that the module name, system, and version exist in the specified project.
  • Check authentication credentials if receiving 401 Unauthorized errors.
  • Confirm the baseUrl is correct if using a self-hosted GitLab instance.
  • Validate query parameters to avoid malformed requests.

Links

Discussion