GitLab API

GitlabTool

Actions1000

Overview

This node operation interacts with the GitLab API to download a specific Terraform module from the Terraform registry. It is useful for automating the retrieval of Terraform modules by specifying the module's namespace, name, and system. For example, it can be used in CI/CD pipelines to fetch Terraform modules dynamically based on project requirements.

Use Case Examples

  1. Automate downloading Terraform modules during infrastructure deployment.
  2. Fetch specific versions of Terraform modules from GitLab's Terraform registry for validation or testing.

Properties

Name Meaning
Skip Authentication Determines whether to skip authentication when making the API request.
Authentication Specifies the authentication method to use if authentication is not skipped.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request (GET, POST, PUT, DELETE, HEAD, PATCH).
Path Parameters Parameters used in the API request path to specify the Terraform module to download, including module_namespace (group's ID or slug), module_name, and module_system.

Output

JSON

  • downloadUrl - URL to download the specified Terraform module.
  • statusCode - HTTP status code returned by the API request.
  • responseHeaders - Headers returned in the API response.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the module_namespace, module_name, and module_system path parameters are correctly set; otherwise, the API request will fail.
  • If authentication is enabled, verify that the GitLab API credential is valid and has sufficient permissions to access the Terraform registry.
  • Check the baseUrl to ensure it points to the correct GitLab instance, especially if using a self-hosted GitLab server.

Links

Discussion