Skip to content

feat(terraform): improve Terraform States service

This code change enhances a Terraform state management service by adding more flexibility and functionality. The main improvements include:

  1. Added optional parameters: The List and Get methods now accept optional configuration parameters, making them more flexible for different use cases.

  2. New deletion capability: A new DeleteVersion method was added that allows users to delete specific versions of Terraform states, rather than just deleting entire states. This gives users more granular control over their infrastructure state management.

  3. Updated tests and mocks: All the testing code was updated to match the new method signatures and include tests for the new deletion functionality.

The changes maintain backward compatibility while expanding the API's capabilities. Users can now pass additional options when listing or retrieving Terraform states, and they have the ability to clean up specific versions of their infrastructure state files when needed. This is particularly useful for managing storage space and maintaining clean state histories in infrastructure-as-code workflows.

Refs Add commands to support managing GitLab-managed... (gitlab-org/cli#7954 - closed)

Edited by Timo Furrer

Merge request reports

Loading