Skip to content

Add .terraform.lock.hcl to terraform template in order to support terraform 0.14

What does this MR do?

This change updates the terraform CI template to support the current GitLab Terraform 0.14 image by caching the .terraform.lock.hcl. Terraform now requires .terraform.lock.hcl

Without this change all pipelines using the :latest Terraform image and the Gitlab template will fail with the below error in the validate step

Error: Could not load plugin
Plugin reinitialization required. Please run "terraform init".
Plugins are external binaries that Terraform uses to access and manipulate
resources. The configuration provided requires plugins which can't be located,
don't satisfy the version constraints, or are otherwise incompatible.
Terraform automatically discovers provider requirements from your
configuration, including providers used in child modules. To see the
requirements and constraints, run "terraform providers".

Screenshots (strongly suggested)

pipline

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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

Related to #296085 (closed)

Edited by Emily Ring

Merge request reports