Skip to content

Commit

Permalink
fix: use recursive for aws operations
Browse files Browse the repository at this point in the history
  • Loading branch information
the-technat committed Dec 13, 2023
1 parent eebdb77 commit 4140c0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create-eks-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
END
- name: Save Terraform configuration to s3 bucket
run: |
aws s3 cp eks-terraform/ s3://${{ env.STATE_BUCKET }}/${{ github.event.inputs.name }}
aws s3 cp eks-terraform/ s3://${{ env.STATE_BUCKET }}/${{ github.event.inputs.name }} --recursive
- name: Create IAM user for terraform
id: aws_user
run: |
Expand All @@ -92,7 +92,7 @@ jobs:
AWS_REGION: "${{ github.event.inputs.region }}"
steps:
- name: Grab Terraform configuration from s3 bucket
run: aws s3 cp s3://${{ env.STATE_BUCKET }}/${{ github.event.inputs.name }} eks-terraform
run: aws s3 cp s3://${{ env.STATE_BUCKET }}/${{ github.event.inputs.name }} eks-terraform --recursive
- name: Setup terraform
uses: hashicorp/setup-terraform@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/delete-eks-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
AWS_REGION: "${{ github.event.inputs.region }}"
steps:
- name: Grab Terraform files from bucket
run: aws mv s3://${{ env.STATE_BUCKET }}/${{ github.event.inputs.name }} eks-terraform
run: aws mv s3://${{ env.STATE_BUCKET }}/${{ github.event.inputs.name }} eks-terraform --recursive
- name: Setup terraform
uses: hashicorp/setup-terraform@v3
with:
Expand All @@ -57,7 +57,7 @@ jobs:
run: terraform -chdir=eks-terraform destroy -auto-approve -input=false -var-file vars.tfvars
- name: Delete state
if: always()
run: aws rm s3://${{ env.STATE_BUCKET }}/${{ github.event.inputs.name }}
run: aws rm s3://${{ env.STATE_BUCKET }}/${{ github.event.inputs.name }} --recursive
cleanup:
needs: destroy
runs-on: ubuntu-latest
Expand Down

0 comments on commit 4140c0f

Please sign in to comment.