我一直在尝试使用 AWS codebuild 运行多个 terragrunt 模块
模块-a 模块-b 模块-v
我按顺序运行所有这些,因为它们有一些依赖性 它们都有一些通用的插件,因此我不想通过单独下载 terraform 来使磁盘膨胀。所以我决定通过运行将它们全部安装在一个文件夹中
export TF_PLUGIN_CACHE_DIR=/root/.terraform.d/plugins
并在codebuild的buildspec.yaml中指定该文件夹
cache:
paths:
- /root/.terraform.d/plugins/
- /root/.terraform.d/plugins/**/*
但是这样做之后我面临以下错误
│ Error: Failed to install provider
│
│ Error while installing gavinbunney/kubectl v1.14.0: cannot install existing
│ provider directory
│ /root/.terraform.d/plugins/registry.terraform.io/gavinbunney/kubectl/1.14.0/linux_amd64
│ to itself
╵
╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/aws v4.67.0: cannot install existing
│ provider directory
│ /root/.terraform.d/plugins/registry.terraform.io/hashicorp/aws/4.67.0/linux_amd64
│ to itself
╵
╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/helm v2.10.1: cannot install existing
│ provider directory
│ /root/.terraform.d/plugins/registry.terraform.io/hashicorp/helm/2.10.1/linux_amd64
│ to itself
╵
╷
│ Error: Failed to install provider
│
│ Error while installing hashicorp/kubernetes v2.21.1: cannot install
│ existing provider directory
│ /root/.terraform.d/plugins/registry.terraform.io/hashicorp/kubernetes/2.21.1/linux_amd64
│ to itself
╵
有人可以帮忙吗?我本质上想要的是
版本 - 地形 v1.5.0 terragrunt 版本 v0.47.0
我尝试选择不同的插件目录,但 terragrunt 根本没有使用它
您找到解决方案了吗?