From f8f71079bf54c1518977664b24c2a5f99f60ffe0 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Tue, 3 Feb 2026 13:52:13 +0000 Subject: [PATCH] add workspaces --- .github/workflows/deploy_terraform.yml | 2 +- infrastructure/terraform/lambda/_template/main.tf | 1 + infrastructure/terraform/lambda/address2UPRN/main.tf | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy_terraform.yml b/.github/workflows/deploy_terraform.yml index 662c4b98..b7743acd 100644 --- a/.github/workflows/deploy_terraform.yml +++ b/.github/workflows/deploy_terraform.yml @@ -73,7 +73,7 @@ jobs: # 2️⃣ Build Docker image (tag = GitHub SHA, digest resolved) # ============================================================ address2uprn_image: - needs: determine_stage + needs: [determine_stage, shared_terraform] uses: ./.github/workflows/_build_image.yml with: ecr_repo: address2uprn-${{ needs.determine_stage.outputs.stage }} diff --git a/infrastructure/terraform/lambda/_template/main.tf b/infrastructure/terraform/lambda/_template/main.tf index 0b3f008a..46c54207 100644 --- a/infrastructure/terraform/lambda/_template/main.tf +++ b/infrastructure/terraform/lambda/_template/main.tf @@ -4,6 +4,7 @@ data "terraform_remote_state" "shared" { bucket = "assessment-model-terraform-state" key = "terraform.tfstate" region = "eu-west-2" + workspace = var.stage } } diff --git a/infrastructure/terraform/lambda/address2UPRN/main.tf b/infrastructure/terraform/lambda/address2UPRN/main.tf index a5978186..b3d41925 100644 --- a/infrastructure/terraform/lambda/address2UPRN/main.tf +++ b/infrastructure/terraform/lambda/address2UPRN/main.tf @@ -8,6 +8,7 @@ data "terraform_remote_state" "shared" { bucket = "assessment-model-terraform-state" key = "terraform.tfstate" region = "eu-west-2" + workspace = var.stage } }