This document outlines methods to free up disk space when the instance that Terraform Enterprise is running on approaches the disk space limit.
These are common problems when a Terraform Enterprise instance is running out of disk space.
Run is errored with below message
... Error: write /...: no space left on device ...
Low disk warning shown from Replicated Dashboard
Low disk space! There may not be enough disk space on the following nodes: <xxx>. Please increase drive space to at least 1 GB."
Fail to generate or empty Support Bundle
The methods described below may be used to reclaim disk space on the instance.
Remove unused Docker data
The following command will remove all unused containers, networks, dangling images, and optionally, volumes. Please double check all stopped containers and unused images, volumes, build caches, and networks before running the command:
docker system prune
Delete unused workspaces
Deleting unused workspaces can reclaim a significant amount of disk space since this operation will delete all run data associated with it (e.g. plans, states, configuration versions). Note that the garbage collection does not happen immediately, so it may take a bit of time for the disk space to be reclaimed.
Other preventive approaches
- Review Terraform configuration directory and add unnecessary paths to
- Moderate usage of mono repo configuration
- Configure Docker log-rotation
Above are methods of freeing up disk space on Terraform Enterprise. If you continue to experience issues after following this guide, please contact HashiCorp Support for further assistance.