Introduction
Problem
The bundle works fine on a TFE server direct, but when used against a Remote Agent it fails.
Problem was first observed with custom provider but also encountered with official and community providers.
Error noted
Operation failed: failed unpacking Terraform: failed creating file
"/root/.tfc-agent/component/terraform/runs/run-xxxx.plan/.terraform.d/plugins":
open /root/.tfc-agent/component/terraform/runs/run-xxx.plan/.terraform.d/plugins: is a directory
xxxplan/.terraform.d/plugins: is a directory
Cause
-
This error happen when customers use the
zip
utility to create custom bundles instead of theterraform-bundle
utility
Solutions:
-
When creating TFE-bundle make sure to Zip bundle to use
-D
flag, or--no-dir-entries
The-D
flag removes files from a zip