When working on Windows with a volume mounted only as a folder, not a drive letter, the
terraform initcommand will fail with the error
EvalSymlinks: too many links.
terraform initcommand fails, which prevent Terraform from being able to perform additional operations such as plan and apply.
Prerequisites (if applicable)
- Terraform for Windows, either 32 bit or 64 bit
- One of the following:
- A secondary drive or other type of volume mounted only as a folder. That is, there is no drive letter such as
D:assigned to the drive
- A OneDrive folder
terraform init, Terraform creates symlinks
- Terraform is developed using the Go programming language, and uses the standard Go library for resolving symlinks
- The standard Go library for resolving symlinks depends on the volume on which the symlink is created having a drive letter, such as
Overview of possible solutions (if applicable)
Create a drive letter mount in addition to the folder mount for the volume.
Open Computer Management
Select Disk Management
Right click on the volume that is currently only mounted with a folder
Select Change Drive Letters and Paths
Add a drive letter
- Use the Linux AMD64 version of Terraform with the WSL on Windows
Once a drive letter is added to the volume's mount points, the
terraform initcommand in a folder on that volume will succeed.