FAQ | This is a LIVE service | Changelog

Skip to content
Commits on Source (2)
......@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [4.3.0] - 2024-06-04
### Added
- Terraform jobs now have a local files directory which gets copied from plan
jobs to apply jobs exposed via the `TF_VAR_local_files_dir` environment
variable. Some terraform configurations generate files as part of the plan
which then need to be present in the apply.
## [4.2.0] - 2024-05-20
### Changed
......
......@@ -7,7 +7,7 @@
#
# Variables
#
# The following variables are used to configure job behavior.
# The following variables are used to configure job behaviour.
#
# GKE_RUNNER_TAG - Use this to specify the required tag for the product's runner (see
# https://gitlab.developers.cam.ac.uk/uis/devops/devhub/gitlab-runner-infrastructure)
......@@ -16,6 +16,11 @@
# registry.gitlab.developers.cam.ac.uk/uis/devops/infra/dockerimages/logan-terraform
#
# TERRAFORM_DEPLOY_VERSION - The version of the TERRAFORM_DEPLOY_IMAGE to use.
#
# The following variables are defined which may be of interest to terraform configurations:
#
# TF_VAR_local_files_dir - set to a location which is copied from plan jobs to apply. This can be used by terraform
# configurations which need to generate files as part of a plan which are used when applying.
include:
- local: /fragments/docker-in-docker.yml
......@@ -24,6 +29,8 @@ variables:
TERRAFORM_DEPLOY_IMAGE: registry.gitlab.developers.cam.ac.uk/uis/devops/infra/dockerimages/logan-terraform
TERRAFORM_DEPLOY_VERSION: "1.4"
TF_DATA_DIR: ${CI_PROJECT_DIR}/terraform_data
TF_VAR_local_files_dir: ${TF_DATA_DIR}/local_files
# This job generates a plan and stores it as an artifact for consumption by a related apply job. It uses the
# -detailed-exitcode flag to enable the additional exit code 2, meaning that the plan executed successfully but
......@@ -85,6 +92,7 @@ variables:
when: always
paths:
- ${TF_DATA_DIR}/${CI_COMMIT_REF_SLUG}-${DEPLOYMENT_ENVIRONMENT}.tfplan
- ${TF_VAR_local_files_dir}
reports:
terraform: ${TF_DATA_DIR}/${CI_COMMIT_REF_SLUG}-${DEPLOYMENT_ENVIRONMENT}.tfplan.report
needs:
......