GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation deletes a Terraform state lock in a specified GitLab project. It is useful for managing Terraform state locks programmatically, especially when a lock needs to be removed to allow further Terraform operations. For example, if a Terraform state lock is stuck or needs to be cleared manually, this operation can be used to delete the lock by specifying the project ID, the Terraform state name, and optionally the lock ID.

Use Case Examples

  1. Deleting a Terraform state lock to resolve a stuck lock issue in a GitLab project.
  2. Automating the cleanup of Terraform state locks in CI/CD pipelines.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request.
Authentication Type of authentication used, default is 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.
Query Parameters Optional query parameters for the request, specifically the Terraform state lock ID.
Path Parameters Path parameters required for the request, including the project ID and the Terraform state name.

Output

JSON

  • statusCode - HTTP status code of the response
  • body - Response body from the API call, typically empty for delete operations

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID and Terraform state name are correctly specified to avoid 404 errors.
  • Verify that the authentication token has sufficient permissions to delete Terraform state locks.
  • Check network connectivity and base URL correctness if requests fail.

Links

Discussion