Closed jye-aviatrix closed 1 year ago
Interesting report, thank you. It looks like the error is thrown by git itself:
/usr/bin/git exited with -1: Cloning into '.terraform/modules/vgw-strongwan-site-to-site-vpn'...
│ BUG: refs/files-backend.c:2956: initial ref transaction called with existing refs
Please therefore do the following in order to determine which of the various pieces are going wrong here.
terraform init
the same way inside WSL, but with a different module (not vgw-strongwan-site-to-site-vpn
).terraform init
: git clone https://github.com/jye-aviatrix/terraform-aws-vgw-strongwan-site-to-site-vpn . && git checkout 1.0.0
Please also supply your version of git
.
In the meantime, some workarounds that could conceivably fix this:
git
if not already using.terraform/modules/
I'm curious as to why the "Error: Failed to download module" is printing twice. That's the only thing here that suggests to me this may be a bug in Terraform Core - otherwise the likely suspects are git, go-getter, and the peculiarities of a VSCode-on-WSL-on-Windows setup.
Hi @jye-aviatrix, I'm cleaning up old issues and I see this one did not receive a response. I am going to close this issue now, please let me know if you believe this action to be taken in error. Thanks!
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.
Terraform Version
Terraform Configuration Files
Debug Output
https://gist.github.com/jye-aviatrix/87aad49e53795860b25dd74d4a421c9b
Expected Behavior
terraform init would work in first try
Actual Behavior
WSL2 terminal running VSCode, first terraform init would fail, consequent terraform init works. If run WSL2 outside of VSCode, terraform init always works.
Steps to Reproduce
terraform init
Additional Context
VSCode Version: 1.70.2 (user setup) Commit: e4503b30fc78200f846c62cf8091b76ff5547662 Date: 2022-08-16T05:35:13.448Z Electron: 18.3.5 Chromium: 100.0.4896.160 Node.js: 16.13.2 V8: 10.0.139.17-electron.0 OS: Windows_NT x64 10.0.22000
WSL2 version: 5.10.102.1-microsoft-standard-WSL2
References
No response