GitLab API

GitlabTool

Actions1000

Overview

This node operation deletes a specific Terraform state associated with a project in GitLab. It is useful for managing infrastructure as code by removing outdated or unnecessary Terraform state files from a GitLab project. For example, a DevOps engineer might use this node to clean up Terraform states after a project migration or to remove corrupted state files.

Use Case Examples

  1. Deleting a Terraform state named 'state1' from a project with ID '12345' in GitLab to maintain clean state management.
  2. Automating the removal of Terraform states in CI/CD pipelines to ensure only relevant states are retained.

Properties

Name Meaning
Skip Authentication Option to skip authentication for the request, useful for public or unauthenticated endpoints.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL for the GitLab instance, default is https://gitlab.com.
Method HTTP method to use for the request, default is GET but DELETE is used for this operation.
Path Parameters Parameters to specify the project ID and the Terraform state name to delete.

Output

JSON

  • statusCode - HTTP status code of the delete operation response
  • body - Response body from the GitLab API after attempting to delete the Terraform state

Dependencies

  • GitLab API authentication token

Troubleshooting

  • Ensure the project ID and Terraform state name are correctly specified; incorrect values will cause the delete operation to fail.
  • Authentication errors may occur if the API token is missing or invalid; verify credentials are correctly configured.
  • Network or permission issues might prevent successful deletion; check network connectivity and user permissions on the GitLab project.

Links

Discussion