Problem
When executing a run in a Terraform Enterprise Flexible Deployment Option (FDO) for Docker environment, the operation may fail with a 'read-only file system' error:
Operation failed: failed fetching Terraform: failed downloading terraform: failed downloading "https://releases.hashicorp.com/terraform/1.3.5/terraform_1.3.5_linux_amd64.zip": GET https://releases.hashicorp.com/terraform/1.3.5/terraform_1.3.5_linux_amd64.zip giving up after 5 attempt(s): failed making temp file: open /tmp/terraform/ae73a8f4a6396f935024d9a80e3b14f1.download-4f5e709d-e501-3016-cec9-fd6e6412b78f: read-only file system
Prerequisites
- You are using Terraform Enterprise Flexible Deployment Options (FDO) with Docker.
Cause
This error occurs when the TFE_DISK_CACHE_VOLUME_NAME environment variable in the compose.yaml file does not point to a valid, writable volume. An incorrect configuration may look like this:
TFE_DISK_CACHE_VOLUME_NAME: tfe_terraform-enterprise-cache
Solution
To resolve this issue, verify that the compose.yaml file correctly defines the TFE_DISK_CACHE_VOLUME_NAME environment variable to use the project name variable.
Update the compose.yaml file with the following value:
TFE_DISK_CACHE_VOLUME_NAME: ${COMPOSE_PROJECT_NAME}_terraform-enterprise-cacheOutcome
After restarting Terraform Enterprise, the file system error should be resolved, and runs should execute successfully.
Additional Information
If issues persist, you may need to gather more information by generating a support bundle.