Manage / admin the GitLab Managed State

Problem to solve

Available only to project maintainers. Users of the GitLab Managed Terraform state would need various administration tools.

What these tools might be?

  • remove state lock
  • remove the state file from storage
  • see the state file as a json
  • see the various versions of a state file

A single project might have multiple state files attached.

Intended users

User experience goal

Manage various aspects of Terraform-related GitLab resources through the UI.

Proposal

  • a Terraform resource is identified by the project it belongs to and the final part of the backend address configuration -backend-config="address=https://gitlab.com/api/v4/projects/<YOUR-PROJECT-ID>/terraform/state/<YOUR-STATE-NAME>"
  • the details view should provide various actions:
    • remove state lock
    • see the state file as a json
    • remove the state file from storage
    • see the various versions of a state file - can be in a separate issue related to #207347 (closed)

Proposed merge requests:

  • [backend] Endpoint to list states (file data not included): !43375 (merged)
  • [backend] Endpoint to view an individual state & file: [TODO]
  • [backend] Mutation to unlock: [TODO]
  • [backend] TBC Mutation to lock: [TODO]
  • [backend] Mutation to delete: [TODO]
  • [backend] Endpoint to view version history (EE): [TODO]
  • ...

Further details

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by Maria Vrachni