Review Terraform plans in Terraform related MRs
Review Terraform plans in Terraform related MRs
Problem to solve
As a DevOps engineer, in order to review terraform plan
outputs, I'd like to see the plan
output in a merge request so that I can add comments and discuss changes with fellow DevOps engineers prior to merge.
Intended users
Proposal
MVC steps
- Provide the summary in a widget (current issue)
- Find a way to measure the usage of this feature following the usage ping and analytics possibilities we have today. We are interested in the number of MRs that receive this widget.
- Provide the plan output: main parts or full plan (follow-up issue, depends on ux-research#698 (closed))
- Build upon / Extend: https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml
- Use a linter-like output that shows a formatted
terraform plan
output into the MR that started to job.
Permissions and Security
View of report should be consistent with other merge request result items and should not contain secrets.
Documentation
An issue was created to document.
Availability & Testing
Should be tested on an example project to ensure it works.
What does success look like, and how can we measure that?
Adoption of terraform plan reports in merge requests, measured through a persicope report. (See issue)
Development
First Iteration
- Add tfplan conversion script to Terraform.gitlab-ci.yml template gitlab#207526 (closed)
- Handle terraform report in gitlab-runner gitlab-runner#10124 (closed)
- Handle terraform report in gitlab (rails) gitlab#207527 (closed)
- Add terraform report to merge request widget gitlab#207528 (closed)
- Update documentation to include instructions on how to get terraform plan results gitlab#207530 (closed)
- Add usage ping for terraform reports gitlab#207532 (closed)
Future iterations
- Create issues based on the results of ux-research#698 (closed)
- Show closed items
Link items together to show that they're related or that one is blocking others.