From b4180c471b8e0ddc7c913e7348577e8250faa39e Mon Sep 17 00:00:00 2001 From: E M <5089238+emizzle@users.noreply.github.com> Date: Thu, 30 Apr 2026 18:15:57 +1000 Subject: [PATCH] delete terraform state lock When the workflow is cancelled, either manually, or automatically from a long-running step (timeout), the terraform state lock had to be manually deleted, or else the next workflow run would never succeed. This change ensures that the state lock file is always deleted after each run. --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54b5b787..760de9d6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -416,6 +416,13 @@ jobs: working-directory: ${{ env.TF_DIR }} run: terraform destroy -auto-approve + - name: Release Terraform state lock + if: always() + run: | + gcloud storage rm \ + "gs://${{ vars.RELEASE_TESTS_TF_STATE_BUCKET }}/clusters/${CLUSTER_NAME}/default.tflock" \ + 2>/dev/null || true + # Release # release: # runs-on: ubuntu-latest