Improve Terraform ci templates
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.
- Take an existing project that imports terraform CI template.
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by D