Setup failed: failed unpacking terraform config: lstat
TFC Run triggered using this GH Action fail with below issue. Same error does not happen when I Queue plan manually from the Terraform Cloud UI.
Terraform v1.0.0
on linux_amd64
Setup failed: failed unpacking terraform config: lstat /tmp/terraform-build-worker01234676/slug: no such file or directory
I've tried configure the workspace with both UI/VCS-driven and API-driven workflows. Same issue in both cases.
Action step:
- name: Terraform Cloud Run
uses: kvrhdn/[email protected]
with:
token: ${{ secrets.TFC_ACCESS_TOKEN }}
organization: MyOpg
workspace: my-workspace
type: apply
wait-for-completion: true
message: |
Run triggered using tfe-run (commit: ${{ github.SHA }})
id: tfe-run
This action obviously uses API driven workflow and I hadn't checked out code.
So it failed with failed unpacking terraform config because there was no tf config for Terraform Cloud to run.
I'll keep open. Maybe improvement can be made to docs to ensure user has checkout step?
- name: Checkout
uses: actions/checkout@v2
Glad you got it figured out 🙂 And yeah, good idea! We could add a small example with checkout.