GitLab API

GitlabTool

Actions1000

Overview

This node operation uploads a Terraform module file to a specific project in GitLab's Terraform Registry. It is useful for automating the publishing of Terraform module versions directly to GitLab, facilitating infrastructure as code workflows. For example, a DevOps engineer can use this node to programmatically upload new versions of Terraform modules after testing, ensuring the latest module versions are available in the registry.

Use Case Examples

  1. Uploading a new version of a Terraform module named 'infra-registry' for the AWS module system to a GitLab project identified by its ID.
  2. Automating the publishing of Terraform module files as part of a CI/CD pipeline to keep the Terraform Registry up to date.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the API request (boolean). Defaults to false.
Authentication The authentication method used for the API request, defaulting to GitLab API key authentication. Hidden if Skip Authentication is true.
baseUrl The base URL of the GitLab instance, defaulting to https://gitlab.com.
Method The HTTP method to use for the request, defaulting to GET. Options include GET, POST, PUT, DELETE, HEAD, PATCH.
Path Parameters Parameters to specify the project ID, module name, and module system for the Terraform module upload.

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 of the Terraform module.
  • module_version - The version of the Terraform module being uploaded.
  • file - The Terraform module package file uploaded to the registry.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the project ID, module name, and module system parameters are correctly specified to avoid 404 errors.
  • Verify that the uploaded file is a valid Terraform module package to prevent upload failures.
  • If authentication is enabled, ensure the GitLab API key credential is valid and has sufficient permissions to upload packages.

Discussion