GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific Terraform state version from a GitLab project. It is useful for managing Terraform state versions by removing outdated or unwanted versions from a project's Terraform state in GitLab. For example, a DevOps engineer might use this node to clean up old Terraform state versions to maintain a tidy infrastructure state management.

Use Case Examples

  1. Deleting a Terraform state version by specifying the project ID, state name, and version serial number.
  2. Automating cleanup of Terraform state versions in CI/CD pipelines.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, defaulting to GitLab API authentication.
baseUrl Base URL of the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but DELETE is relevant here.
Path Parameters Parameters required in the request path to identify the project, Terraform state name, and version serial to delete.

Output

JSON

  • success - Indicates whether the deletion was successful.
  • message - Additional message or information about the deletion result.

Dependencies

  • GitLab API authentication token or credentials

Troubleshooting

  • Ensure the project ID, Terraform state name, and version serial are correctly specified; incorrect values will cause the deletion to fail.
  • Authentication errors may occur if the API token is missing or invalid; verify credentials are correctly configured.
  • HTTP method must be DELETE for this operation; using other methods may result in errors.

Links

Discussion