Skip to content

Commit

Permalink
Prepare cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Jan 5, 2024
1 parent 1a392ce commit 5b2bfda
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,13 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.B2_TFBACKUP_SECRET_KEY }}
AWS_DEFAULT_REGION: us-east-1
AWS_ENDPOINT_URL: https://s3.us-east-005.backblazeb2.com
S3_URI: s3://terraform-state-backup/${{ github.repository }}
run: |
terraform show -json > state.json
aws s3 cp state.json s3://terraform-state-backup/${{ github.repository }}/$(date +%s).json
aws s3 cp state.json ${S3_URI}/$(date +%s).json
FILES=$(aws s3 ls ${S3_URI}/ | sort -)
echo ${FILES}
- run: terraform show -no-color tfplan > summary.txt
if: ${{ github.event_name == 'pull_request' }}
Expand Down

0 comments on commit 5b2bfda

Please sign in to comment.