I have a brand-new local Terraform project that I have just cloned from gitlab. I have not made any changes to the code, but when I run terraform init
I get the following error, repeated for every module in the project:
Error: Failed to download module
Could not download module " <module name>"
(<filename>.tf:<line #>) source code from
"git::<gitlab address>":
error downloading
'<gitlab address>':
C:\Program Files\Git\cmd\git.exe exited with 1: error: Your local changes to
the following files would be overwritten by checkout:
README.md
Please commit your changes or stash them before you switch branches.
Aborting
Every module download fails on the same file: README.md
. Again, I have made no changes to any files in the project.
My initial thought was that this might be related to a line-endling issue: I am using Windows, and the module files in the remote repository were created on a Mac. To address this, I ran the command git config --global core.autocrlf true
(following the recommendations here)
I then deleted the .terraform folder and re-ran terraform init
, but got the same set of errors.
What am I missing?