From 78af5d86f69ba440d9096613aa5b670000bef2bc Mon Sep 17 00:00:00 2001 From: Marcus Weiner Date: Fri, 5 Jan 2024 22:54:06 +0100 Subject: [PATCH] Only backup after apply --- .github/workflows/terraform.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/terraform.yaml b/.github/workflows/terraform.yaml index 9ba9290..5b1f0f1 100644 --- a/.github/workflows/terraform.yaml +++ b/.github/workflows/terraform.yaml @@ -30,6 +30,7 @@ jobs: - run: terraform apply tfplan if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} - name: Backup state + if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} env: AWS_ACCESS_KEY_ID: ${{ secrets.B2_TFBACKUP_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.B2_TFBACKUP_SECRET_KEY }}