Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terraform module symlink error #3070

Closed
JeanMertz opened this issue Aug 25, 2015 · 11 comments · Fixed by #8398
Closed

terraform module symlink error #3070

JeanMertz opened this issue Aug 25, 2015 · 11 comments · Fixed by #8398
Assignees

Comments

@JeanMertz
Copy link
Contributor

My module was pointing to a GH repository. When debugging, I changed it to point to the local checkout of that repository. This caused the following error:

$ terraform get -update
Get: file:///Users/Jean/code/terraform/terraform-dcos (update)
Error loading Terraform: Error downloading modules: error downloading module 'file:///Users/Jean/code/terraform/terraform-dcos': destination exists and is not a symlink

removing the .terraform/modules directory solved the problem.

Some possible solutions:

  • automatically remove/override the module directory with a symlink
  • ask yes/no
  • clarify why the error happens and how to solve it
@robwar
Copy link

robwar commented Nov 5, 2015

I ran into this error as well. The changed module source doesn't load correctly.

@rradecki
Copy link

+1
I have the same issue. Is there any ETA for this?

@pgporada
Copy link

The clarification would be a useful addition. Just ran into this.

@justinclayton
Copy link
Contributor

+1. This should be a pretty simple one to knock out.

@ElliotG
Copy link
Contributor

ElliotG commented Apr 7, 2016

Adding that I ran into this as well. Same issue :(

@tdeheurles
Copy link

Having the same issue when running inside a docker container (docker-toolbox). Removing the .terraform/modules didn't solve for me.

(More to report than to solve as the issue is certainly linked to docker)

@mitchellh mitchellh self-assigned this Aug 22, 2016
robproper pushed a commit to GSA/data.gov that referenced this issue Dec 21, 2016
@ozbillwang
Copy link

If you set s3 as state file backend, recommend to remove .terraform directly, because you need clean terraform.tfstate as well

@donbecker
Copy link

I was just bitten by this one, and spent a really long time trying to figure out why I wasn't seeing changes made to my modules. Deleting the entire .terraform directory and running terraform init seemed to fix it. I'm still not 100% sure why I would ever need to do this. This was using s3 state lock, but with no pre-existing state. Modules are suggested to be the right way to use Terraform, but I'm not clear on when using modules should necessitate deleting the .terraform directory to see module changes.

@brianpayne2
Copy link

Thank you @donbecker - I was having the same problems and your solution did the trick! I had made some changes to a module linked in another Github repo and it was not being picked up when I tried to rerun my main terraform. Must be some kind of cacheing issue. Cheers!

@scott1138
Copy link
Contributor

I encountered this same error today as well. Deleted the .terraform directory and ran an init as well.

@ghost
Copy link

ghost commented Apr 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.