Problem
When attempting to download and unpack custom Terraform bundles via agents, they fail to unpack, citing an error: Operation failed: failed unpacking Terraform:
failed creating file
Cause
This is caused by the bundle being zipped incorrectly.
Solution
To resolve this error, use the Terraform Bundle tool to generate your custom bundles.
If manually zipping using the zip command, use the -D
flag, which doesn’t create entries in the zip archive for directories.
If you continue to have experience this error during Terraform runs, please contact HashiCorp Support.