GitLab API

GitlabTool

Actions1000

Overview

This node operation interacts with the GitLab API to download a specific version of a Terraform module from the Terraform registry. It is useful for automating the retrieval of Terraform modules hosted on GitLab, enabling infrastructure as code workflows to programmatically access module versions for deployment or analysis.

Use Case Examples

  1. Automatically download a specific version of a Terraform module during a CI/CD pipeline.
  2. Fetch the latest approved version of a Terraform module for infrastructure provisioning.

Properties

Name Meaning
Skip Authentication Option to skip API authentication, useful for public modules or unauthenticated access.
Authentication Type of authentication used for the API request, defaulting to GitLab API token.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method used for the API request, default is GET.
Query Parameters Query parameters for the API request, specifically the module_version to specify which version of the Terraform module to download.
Path Parameters Path parameters for the API request including module_namespace (group's ID or slug), module_name, and module_system to identify the Terraform module uniquely.

Output

JSON

  • downloadUrl - URL to download the specified Terraform module version
  • statusCode - HTTP status code of the API response
  • headers - HTTP headers returned by the API response

Dependencies

  • GitLab API token credential

Troubleshooting

  • Ensure the module_namespace, module_name, module_system, and module_version parameters are correctly set; incorrect values will result in API errors or no data.
  • If authentication is required and skipped, the request may fail with authorization errors; verify authentication settings.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the correct API endpoint is targeted.

Links

Discussion