Skip to content

Add new `Terraform-Module.gitlab-ci.yml` CI/CD template

Timo Furrer requested to merge terraform-module-ci-template into master

What does this MR do and why?

This change set introduces a new CI/CD template named Terraform-Module.gitlab-ci.yml which can be used to easily deploy a Terraform Module to the GitLab Terraform Registry.

Prior to this change the documentation contained a pipeline snippet which could be used to achieve the same. This is a little cumbersome for users though and it would be nice if that snippet would just exist as a template - that's what this MR does ;)

The template comes as a pipeline and job template which makes it easy to adapt to more complex use-cases like deploying multiple Terraform Modules from the same pipeline.

This change set also contains the relevant new template metrics and specs for the new templates.

Screenshots or screen recordings

Aspect Reference
New template can be selected in UI image
Regular branch pipeline https://gitlab.com/timofurrer/terraform-pet-site-module-template/-/pipelines/761336962
Tag pipeline https://gitlab.com/timofurrer/terraform-pet-site-module-template/-/pipelines/761337414

How to set up and validate locally

  1. Create a new project
  2. Create a new .gitlab-ci.yml using WebIDE
  3. Create from Terraform-Module template
  4. Run branch pipelines and verify
  5. Run tag pipelines and verify

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Timo Furrer

Merge request reports