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 } }