GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation interacts with the GitLab API to retrieve information about a specific Terraform module within a project. It is useful for users who want to programmatically access details about Terraform modules stored in GitLab's package registry, such as module metadata or configuration. For example, DevOps teams can automate the retrieval of module information to integrate with their infrastructure as code workflows.

Use Case Examples

  1. Retrieve details of a Terraform module named 'infra-registry' using the AWS module system from a specific GitLab project identified by its ID or full path.
  2. Automate fetching Terraform module metadata to validate module versions or configurations before deployment.

Properties

Name Meaning
Skip Authentication Option to skip authentication when making the API request.
Authentication Type of authentication to use for the API request, defaulting to GitLab API key authentication.
baseUrl 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 Optional query parameters for the API request, including the 'terraform-get' flag used for Terraform get redirection.
Path Parameters Path parameters required for the API endpoint, including 'id' (project ID or full path), 'module_name' (name of the Terraform module), and 'module_system' (module system, e.g., aws).

Output

JSON

  • id - The ID or full path of the GitLab project.
  • module_name - The name of the Terraform module.
  • module_system - The module system used by the Terraform module.
  • terraform-get - Optional query parameter indicating Terraform get redirection flag.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID or full path provided in the 'id' path parameter is correct and accessible with the provided authentication.
  • Verify that the module name and module system parameters are correctly specified and exist in the project.
  • Check that the base URL is correct and reachable, especially if using a self-hosted GitLab instance.
  • If authentication is skipped, ensure the API endpoint is publicly accessible or does not require authentication.
  • Common error messages may include 404 Not Found if the project or module does not exist, or 401 Unauthorized if authentication fails.

Links

Discussion