【问题标题】:Seeing "The filename or extension is too long" when "terragrunt plan" is executed in Windows在 Windows 中执行“terragrunt plan”时看到“文件名或扩展名太长”
【发布时间】:2021-08-08 21:40:58
【问题描述】:

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

运行命令:terraform init -backend-config=region=eu-west-2 -backend-config=bucket=bucket-name" -backend-config=dynamodb_table=lock-table -backend-config=encrypt=true - backend-config=key=ec2/terraform.tfstate

正在初始化后端...

成功配置后端“s3”! Terraform 将自动 除非后端配置更改,否则请使用此后端。

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

  • 正在查找与“~> 3.36.0”匹配的 hashcorp/aws 版本...
  • 正在安装 hashcorp/aws v3.36.0...

错误:无法安装提供程序

安装 hashcorp/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

【问题讨论】:

    标签: terraform terragrunt hashicorp


    【解决方案1】:

    今天遇到了这个问题,我通过创建TERRAGRUNT_DOWNLOAD 环境变量解决了。

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

    从这个问题得到这个解决方案 https://github.com/gruntwork-io/terragrunt/issues/581#issuecomment-460051767

    【讨论】:

    • 这成功了!谢谢你。能够使用以下方法对此进行测试:TERRAGRUNT_DOWNLOAD=C:\.terragrunt-cache terraform init
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-11-24
    • 2021-11-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-09
    相关资源
    最近更新 更多