提问者:小点点

在Windows中执行“terragrunt计划”时,看到“文件名或扩展名太长”


从Visual Studio代码执行“terragrunt plan”在Windows 10中给出以下错误:

正在运行命令:terraform init-band config=region=eu-west-2-band config=bucket=bucket name“-band config=eynolddb_table=lock table-band config=cencrypt=true-band config=]key=ec2/terraform.tfstate

初始化后端…

成功配置后端“s3”!除非后端配置发生变化,否则Terraform将自动使用此后端。

正在初始化提供程序插件。。。

  • 查找与“~

错误:无法安装提供程序

安装hashicorp/aws v3.36.0时出错:mkdir. terraform/plugins/registry.terraform.io/hashicorp/aws/3.36.0/windows_amd64:文件名或扩展名太长。

[terragrunt] 2021/05/19 15:39:20遇到多个错误:退出状态1


共3个答案

匿名用户

今天有这个问题,我创建了一个TERRAGRUNT_DOWNLOAD环境变量来解决。

我将值设置为 TERRAGRUNT_DOWNLOAD=C:\.terragrunt-cache

从此问题获得此解决方案https://github . com/grunt work-io/terra grunt/issues/581 # issue comment-460051767

匿名用户

感谢鲁本斯建议使用TERRAGRUNT_DOWNLOAD环境变量。我能够解决这个问题。

以下是 terragrunt 中的完整步骤:

    < li >在cmd中,设置TERRAGRUNT_DOWNLOAD并调用init:
set TERRAGRUNT_DOWNLOAD=C:\\.terragrunt-cache

terragrunt init

然后将C:\\.terrgrunt缓存内容复制或移动到我的项目中的.terrgrut缓存

从cmd中,取消设置TERRAGRUNT_DOWNLOAD并调用apply

set TERRAGRUNT_DOWNLOAD=

terragrunt apply

匿名用户

正确的解决方法如下:

    < li >以管理员身份启动Git Bash < li >运行命令< code > git config-system core . long paths true

如何修复git克隆过程中的“文件名过长错误”