You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Failed to install provider
Error while installing hashicorp/kubernetes v2.0.3: open
.terraform\providers\registry.terraform.io\hashicorp\kubernetes\2.0.3\windows_amd64\terraform-provider-kubernetes_v2.0.3_x5.exe:
Le chemin d’accès spécifié est introuvable.
Error: Failed to install provider
Error while installing hashicorp/template v2.2.0: open
.terraform\providers\registry.terraform.io\hashicorp\template\2.2.0\windows_amd64\terraform-provider-template_v2.2.0_x4.exe:
Le chemin d’accès spécifié est introuvable.
Error: Failed to install provider
Error while installing hashicorp/random v3.1.0: open
.terraform\providers\registry.terraform.io\hashicorp\random\3.1.0\windows_amd64\terraform-provider-random_v3.1.0_x5.exe:
Le chemin d’accès spécifié est introuvable.
time=2021-03-28T00:17:32+01:00 level=error msg=Hit multiple errors:
Hit multiple errors:
exit status 1
Expected Behavior
check the local path length and in case of exceeding the length throw a custom error message
Actual Behavior
no error is present at the TRACE log , except the below generic exception at the end Error: Failed to install provider , the specified path is not found
Steps to Reproduce
terraform init
The text was updated successfully, but these errors were encountered:
According to the Microsoft documentation Maximum Path Length Limitation, the MAX_PATH limit is on by default but can be disabled in recent versions of Windows 10.
You may therefore be able to work around this for now by enabling the global setting LongPathsEnabled in your system registry, although that does mean that all other applications on your system might also encounter long paths, and older software might not be compatible with those.
That documentation also describes a way for Terraform itself to declare that it supports long paths, by including an application manifest. Including that manifest resource directly inside the terraform.exe file depends on the resolution of golang/go#17835, although there still seems to be some debate there about exactly what behavior Go programs should currently have and what impact the manifest would have. In particular, the related proposal golang/go#44466 was declined on the grounds that it's possible to use separate tools to add a manifest resource to an executable after the Go toolchain has compiled it.
Since our build process is currently standardized across all platforms (using a cross-compiler tool) we are not currently equipped to run custom post-processing steps, such as adding resources, to the executable only on one platform, but it seems like that is what would be required to fully resolve this, and so I'm going to mark this as an enhancement to reflect that we need to do some further design work in order to understand the requirements and implications.
In the meantime, Terraform is subject to the limitations of each platform it runs on and unfortunately on windows MAX_PATH is one of those limitations. Until we're able to prioritize further research on this, I think it'll be necessary to work around it by placing your Terraform working directory at a shallower path on your system, or by setting the TF_DATA_DIR environment variable to force Terraform to place the plugin cache (and other working directory state) in a separate location from the working directory.
terraform fails to download the providers exe if the exe local path exceeds the windows default path limits 260.
below two examples that were failing.
D:\Terragrunt\TERRAGRUNT-EXAMPLE\.terragrunt-cache\GnjRrmlHLEossfvW8K1BLYF-j9o\p8RjqOBWuZlKpfg3qiYX6niuHqs\modules\powercard\parent_module_v4\.terraform\providers\registry.terraform.io\hashicorp\kubernetes\2.0.3\windows_amd64\terraform-provider-kubernetes_v2.0.3_x5.exe D:\Terragrunt\TERRAGRUNT-EXAMPLE\.terragrunt-cache\GnjRrmlHLEossfvW8K1BLYF-j9o\p8RjqOBWuZlKpfg3qiYX6niuHqs\modules\powercard\parent_module_v4\.terraform\providers\registry.terraform.io\hashicorp\random\3.1.0\windows_amd64\terraform-provider-random_v3.1.0_x5.exe
Terraform Version
Crash Output
Expected Behavior
check the local path length and in case of exceeding the length throw a custom error message
Actual Behavior
no error is present at the TRACE log , except the below generic exception at the end
Error: Failed to install provider , the specified path is not found
Steps to Reproduce
terraform init
The text was updated successfully, but these errors were encountered: