From 2e989e59efadf6fcd5639026190e90139e0ecc35 Mon Sep 17 00:00:00 2001 From: E M <5089238+emizzle@users.noreply.github.com> Date: Fri, 17 Apr 2026 15:25:56 +1000 Subject: [PATCH] Ensure the cluster is always destroyed Always teardown the cluster if the terraform apply step has started to run, regardless of its result. --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 61aa7933..6d1e4ae4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -237,6 +237,7 @@ jobs: run: terraform init - name: Terraform apply + id: tf-apply working-directory: ${{ env.TF_DIR }} run: terraform apply -auto-approve @@ -291,7 +292,7 @@ jobs: [[ "$job_status" == "SuccessCriteriaMet" ]] || exit 1 - name: Terraform destroy - if: always() + if: always() && steps.tf-apply.conclusion != 'skipped' working-directory: ${{ env.TF_DIR }} run: terraform destroy -auto-approve