Develop a Terraform CI/CD template for the GKE gitlab runner
Alongside https://gitlab.developers.cam.ac.uk/uis/devops/devhub/gitlab-runner-infrastructure/-/issues/2 we should develop an end-to-end terraform deployment pipeline template specifically for use with this new GKE gitlab runner.
It should contain the following:
- Test jobs
- terraform validate and fmt
- tflint
- tfsec
- Plan jobs
- Plans should only run when a MR is open.
- Plans should be run against every environment and MR reports should be generated for the Gitlab UI.
- Apply jobs
- Apply jobs should only run on. commits/merges to the default branch.
- Apply to staging environment should always happen automatically.
- All other envs should require manual trigger for apply.
Edited by Ryan Kowalewski