-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Module source files deleted on Windows (possibly due to hard links) #7697
Comments
The actual issue is in the "go-getter" repo. It could be that a middle way would be calling I'll attempt to experiment a bit and will report whether it shows the same resilience to permissions. My go is slightly rusty but I hope it will be useful. |
Did you find any workarounds for this? module source files are getting deleted on windows for me when I remove the .terraform directory |
I ended up removing the junction first before deleting .terraform, not clean but seems to avoid the module sources being removed
|
+1 on this , a fix would be great. This is critical really as how can we ever launch many environments from the same bunch of modules and never have the ability to delete the old environments directories that are no longer in use. To delete would and does(I have tested) blast away all the module source code. Every other active environment running from these modules is then completely broken. |
Hi all! Sorry for the long silence here. In the master branch now we have a change which will stop using symlinks for this purpose altogether, and will instead just refer directly to the relative directory path given in the module Since this change is already merged, I'm going to close this out. The fix will be included in the forthcoming v0.12.0 release. |
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. |
I am developing locally (v0.6.16, Windows 10, cygwin shell) and had my whole module folder wiped clean.
What I did:
/c/work/module
and wrote a bunch of source files there (e.g.xxxxx.tf
), and created afiles
subfolder containing a bunch of data files./c/work/setup
and wrote amysetup.tf
file which instantiates the module with some parameters, referencing the module usingsource = ../module
terraform get
in thesetup
folder/c/work
and didrm -rf setup
module
file have been wiped clean, including sources and data files subfolderRepeating this exercise shows complete reproducibility. Each time the module sources are wiped clean. Naturally I would expect them to remain unharmed.
Looking through Windows eyes, I see that the "link" to the module source is created as a Junction:
C:\>dir c:\work\setup\.terraform\modules
Directory of C:\work\setup\.terraform\modules
07/19/2016 02:38 PM <DIR> .
07/19/2016 02:38 PM <DIR> ..
07/19/2016 02:38 PM <JUNCTION> dad20d2bf082af4bcc75117f33d47285 [c:\work\module]
0 File(s) 0 bytes
3 Dir(s) 26,666,666,468 bytes free
This may be related. A
<JUNCTION>
in Windows is "harder" than a<SYMLINK>
, and it could be thatrm -rf
deletes its contents recursively.I suspect that #7484 might be related, but cannot be sure.
The text was updated successfully, but these errors were encountered: