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.
This commit is contained in:
E M 2026-04-30 18:15:57 +10:00
parent 94afc921e0
commit 185aa06514
No known key found for this signature in database

View File

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