Skip to content

Commit

Permalink
refactor(terraform): reorder steps
Browse files Browse the repository at this point in the history
Group all steps related to preparing source code before running `terraform apply`:

* Checkout
* Download artifact
* Restore cache

Release-As: 9.10.4
  • Loading branch information
hknutsen committed Nov 19, 2024
1 parent 4e4c69f commit 8298e7b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,12 @@ jobs:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ inputs.working_directory }}

- name: Restore cache
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a
with:
path: ${{ needs.terraform-plan.outputs.plugin-cache-dir }}
key: ${{ needs.terraform-plan.outputs.cache-primary-key }}

- name: Setup Terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd
with:
Expand All @@ -300,12 +306,6 @@ jobs:
gpg -d --batch --passphrase "$ENCRYPTION_PASSWORD" "$tarball" | tar -xv
rm "$tarball"
- name: Restore cache
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a
with:
path: ${{ needs.terraform-plan.outputs.plugin-cache-dir }}
key: ${{ needs.terraform-plan.outputs.cache-primary-key }}

- name: Terraform Apply
run: terraform apply -auto-approve -input=false "$TFPLAN_FILE"

Expand Down

0 comments on commit 8298e7b

Please sign in to comment.