Introduction
Problem
The bundle works fine on a Terraform Enterprise (TFE) server directly, but when used against a Remote Agent it fails.
Problem observed with custom providers 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 happens 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