Skip to content

Improve Terraform ci templates

D requested to merge gitlab-community/gitlab:improve-tf-ci-templates into master

What does this MR do and why?

Avoid globals in Terraform CI template

We should not use global or default keywords in job templates. Instead we define a .terraform:default template that can the user can override in .gitlab-ci.yml.

This change was only applied to latest template to avoid breaking existing workflows using the stable template.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Take an existing project that imports terraform CI template.
  2. Replace the template import with
    include:
      - project: 'gitlab-community/gitlab'
        ref: improve-tf-ci-templates
        file: '/lib/gitlab/ci/templates/Terraform/Base.latest.gitlab-ci.yml'

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 D

Merge request reports