2

从 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

4

1 回答 1

1

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

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

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

于 2021-07-22T12:41:34.073 回答