Terraform State details page and version management UI
Problem to solve
Provide a State details page where the users can see information about the State file, such as the file size, the terraform version, the commit sha and branch that updated to the latest version. The page will also provide a list of the Terraform State file versions so that the users can view and navigate to the related MRs and Jobs that updated the State to troubleshoot.
Intended users
- Cameron (Compliance Manager)
- Devon (DevOps Engineer)
- Allison (Application Ops)
- Priyanka (Platform Engineer)
User experience goal
This is the first step to make GitLab the tool of choice for troubleshooting Terraform by providing all the information and links to the code changes that updated the State file historically.
Proposal
Iterations
Iteration 1
- State details page with top level state information
- state file size?
- We would need calculate it and store it, it’s probably easy
- Carrierwave may already have this accessible since it comes back from S3 metadata, or I may be misremembering and you have to file.read under the hood to get it, in which case storing it at update time would be best. This along with other pieces of info in the header are actually from whatever the latest version is
- Versions tab with versions table, as this is similar to the state listing, we can probably re-use a lot of code, and there is no need to separate it further
**Iteration 2 **
- Actions for individual state versions: download
- Actions in the state details page: download, delete
Iteration 3
- Actions for individual state versions: remove
- Reasoning: potential complexity of access/workflow, needs research
- Access control, only maintainers can remove individual state versions
Iteration 4 Version comparison
Designs
Further details
Split from #207347 (closed)
Next steps to improve troubleshooting experience: #271591, #281187, #281829 (closed)
Permissions and Security
Maintainers only have access