GitLab API icon

GitLab API

Gitlab

Actions917

Overview

This node operation retrieves a specific Terraform module file from the GitLab Terraform Registry API. It is useful for automating the fetching of Terraform module files based on module namespace, name, system, and version, enabling integration of Terraform module management within workflows.

Use Case Examples

  1. Automatically download a Terraform module file for a given version to use in infrastructure automation.
  2. Fetch the latest version of a Terraform module file from GitLab to validate or analyze it in a CI/CD pipeline.

Properties

Name Meaning
Skip Authentication Whether to skip authentication when making the API request.
Authentication The authentication method used for the API request, hidden unless Skip Authentication is false.
baseUrl The base URL of the GitLab instance to send the request to.
Method The HTTP method to use for the request (GET, POST, PUT, DELETE, HEAD, PATCH).
Query Parameters Query parameters for the request, specifically the module version to fetch.
Path Parameters Path parameters specifying the module namespace, name, and system to identify the Terraform module.

Output

JSON

  • fileContent - The content of the Terraform module file retrieved from the API.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the module_namespace, module_name, module_system, and module_version parameters are correctly set; missing or incorrect values will cause the API request to fail.
  • If authentication is enabled, verify that the GitLab API credentials are valid and have sufficient permissions to access the Terraform Registry.
  • Check the baseUrl if using a self-hosted GitLab instance to ensure the URL is correct and accessible.

Links

Discussion