Unverified Commit 9bdb308f authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch '59-should-terraform-lock-hcl-really-be-in-cache' into 'master'

Resolve "Should ".terraform.lock.hcl" really be in cache ?"

Closes #59

See merge request to-be-continuous/terraform!89
parents 71f4f27f 0c13bfff
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -285,6 +285,12 @@ Be aware of the following:
* if the specified workspace doesn't exist, the template will create it,
* HTTP backend (default) doesn't support Workspaces. [See supported backends here](https://developer.hashicorp.com/terraform/language/state/workspaces#backends-supporting-multiple-workspaces).

### Terraform lock file

As explained in [Terraform documentation](https://developer.hashicorp.com/terraform/language/files/dependency-lock#lock-file-location), _you should include the `.terraform.lock.hcl` file in your version control repository_.

This will guarantee the Terraform template is using exactly the same dependencies version as you are using in your local development environment.

## Configuration reference

### Secrets management
+0 −1
Original line number Diff line number Diff line
@@ -677,7 +677,6 @@ stages:
    key: "$CI_COMMIT_REF_SLUG-terraform"
    paths:
      - $TF_PROJECT_DIR/.terraform/
      - $TF_PROJECT_DIR/.terraform.lock.hcl

# Create job prototype
# @arg ENV_PLAN_ENABLED : environment specific plan to apply (if transfered from upstream jobs)