diff --git a/.github/workflows/destroy.yml b/.github/workflows/destroy.yml index babc95a..3846482 100644 --- a/.github/workflows/destroy.yml +++ b/.github/workflows/destroy.yml @@ -84,6 +84,7 @@ jobs: - name: Terraform Destroy run: | + terraform workspace select ${{ github.event.inputs.environment }} || terraform workspace new ${{ github.event.inputs.environment }} if ! ../../scripts/ci_retry_command.sh "terraform destroy -lock=false -auto-approve -var-file='${{ env.TFVARS_FILE_NAME }}.tfvars'"; then echo "Terraform failed after all retry attempts" exit 1