Adds Terraform.latest.gitlab-ci.yml CI template
What does this MR do?
Will deal with #223131 (closed) by creating a template that provides simpler and flexible configuration to the user. Another MR will follow to update Infrastructure as code with the Terraform and GitLab documentation so the user can benefit from a much easier configuration template.
As described in the issue, this new template will allow the user to seamlessly implement a Simple Terraform Pipeline as well as a concise Terraform Pipeline with multiple envs
Breaking changes and how to deal with them
NOTE 1: The Terraform.gitlab-ci.yml
is not documented to be used with an include.template
. Rather, it's only available from the list of templates when adding a new file. When the template is applied its body gets rendered in the file instead of referenced by an include.template
. Therefore, breaking changes are very unlikely.
NOTE 2: Considering NOTE 1 we intend to open up a follow-up issue to discuss if perhaps we could convert the Terraform.latest.gitlab-ci.yml
into an include.template
.
NOTE 3: These are less of a breaking changes and more of informative support notes.
Terraform init
terraform init
is now terraform init -reconfigure
, which is actually a fix. So the current template is actually broken in regards to the GitLab HTTP backend.
Terraform image
The source of the image is changing from
registry.gitlab.com/gitlab-org/gitlab-build-images:terraform
to
registry.gitlab.com/gitlab-org/terraform-images/stable:latest
This might mean that you might have to wait a bit for the latter image to be updated if the former is ahead.
Job Stages
Be aware that the set of stages available on the previous template changed a bit. So if you're customizing these stages for any reason, perhaps you might need to rename them.
-
init
was introduced as a new stage. -
test
was unused and now it's not present anymore.
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team