Skip to content

Commit

Permalink
update the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
FaithKovi committed Jul 31, 2024
1 parent 37764b4 commit c38e16f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ jobs:
- name: Destroy Terraform
working-directory: ./terraform
if: ${{ failure() }}
run: terraform destroy -var-file=variables.tfvars -auto-approve
run: |
terraform init
terraform destroy -var-file=variables.tfvars -auto-approve
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion terraform/empty_bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def empty_bucket(bucket_name):
bucket.objects.all().delete()

if __name__ == "__main__":
tfvars_file = 'variables.tfvars'
tfvars_file = './variables.tfvars'
bucket_name = get_bucket_name(tfvars_file)
print(f"Emptying bucket: {bucket_name}")
empty_bucket(bucket_name)
Expand Down

0 comments on commit c38e16f

Please sign in to comment.