From b35e996a6bd4e1b90ab09a3e0872a820348ee052 Mon Sep 17 00:00:00 2001 From: Mitch Date: Tue, 10 Dec 2024 11:12:34 -0500 Subject: [PATCH] fix: destroy if we can --- .github/workflows/network-deploy.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/network-deploy.yml b/.github/workflows/network-deploy.yml index bb76c24a73d..d8c8cb42375 100644 --- a/.github/workflows/network-deploy.yml +++ b/.github/workflows/network-deploy.yml @@ -141,8 +141,16 @@ jobs: - name: Terraform Destroy working-directory: ./spartan/terraform/deploy-release if: ${{ inputs.run_terraform_destroy == 'true' }} + # Destroy fails if the resources are already destroyed, so we continue on error + continue-on-error: true run: | - terraform destroy -auto-approve + terraform destroy -auto-approve \ + -var="RELEASE_NAME=${{ env.NAMESPACE }}" \ + -var="VALUES_FILE=${{ env.VALUES_FILE }}" \ + -var="GKE_CLUSTER_CONTEXT=${{ env.GKE_CLUSTER_CONTEXT }}" \ + -var="AZTEC_DOCKER_IMAGE=${{ env.AZTEC_DOCKER_IMAGE }}" \ + -var="L1_DEPLOYMENT_MNEMONIC=${{ steps.get-mnemonic.outputs.mnemonic }}" + -lock=${{ inputs.respect_tf_lock }} - name: Terraform Plan working-directory: ./spartan/terraform/deploy-release