Support versioning for Terraform state backend
Having access to previous versions of a Terraform state is a necessity both for compliance and occasional debugging needs. Support for versioning of GitLab Managed Terraform states is provided from GitLab 13.4. Versioning is turned on automatically for new Terraform state files. Existing GitLab Managed Terraform state files will be migrated automatically to versioned storage in a later release.
Problem to solve
As a Software Developer, I need a way to see previous versions of Terraform state files, in order to debug and fix infrastructure changes.
As a Compliance Manager, I need a way to see previous versions of Terraform state files, in order to have evidence about the state of infrastructure in retrospect.
The Terraform backend state can support versioning for rollback or auditing purposes.
Definition of done
API-only access to Terraform versions as part of GitLab Core
- ~~[ ] UI based access to Terraform state versions as part of GitLab Premium~~ Moved to #254640 (closed)
[ ] Ability to rollback to previous version of State(Why this is not part of DoD?)
- provide a GUI to show a list of state file versions, linked to
- provide a GUI to show a JSON output of the state file
- the list and single state file views can be accessed by project maintainers rights