From 679684da0e00799a6c861234f2a4c731c1d6fa61 Mon Sep 17 00:00:00 2001 From: just-mitch <68168980+just-mitch@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:01:35 -0500 Subject: [PATCH] fix: destroy old masternet if we can (#10584) --- .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