GitLab API

GitlabTool

Actions905

Overview

This node operation retrieves information about a specific Terraform module from a GitLab project's Terraform registry using the GitLab API. It is useful for automating infrastructure management workflows by programmatically accessing Terraform module details stored in GitLab. For example, it can be used to fetch module metadata for deployment automation or auditing purposes.

Use Case Examples

  1. Fetch details of a Terraform module named 'infra-registry' using the AWS module system from a GitLab project identified by its ID or full path.
  2. Automate retrieval of Terraform module information to integrate with CI/CD pipelines for infrastructure as code.

Properties

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

Output

JSON

  • id - The ID or full path of the GitLab project.
  • module_name - Name of the Terraform module.
  • module_system - Terraform module system used.
  • terraform_get - Flag indicating Terraform get redirection status.
  • response - The JSON response from the GitLab API containing module details.

Dependencies

  • GitLab API key credential

Troubleshooting

  • Ensure the project ID or full path is correct and accessible with the provided authentication.
  • Verify that the module name and module system parameters are accurate and exist in the specified project.
  • Check network connectivity and base URL configuration if the API request fails.
  • If authentication is skipped, ensure the API endpoint is publicly accessible or does not require authentication.

Links

Discussion