小编Max*_*is4的帖子

Terraform 提供程序问题:registry.terraform.io/hashicorp/s3

我目前有一段代码,我一直在安静地使用它,该代码调用自定义 S3 模块。今天,我尝试运行相同的代码,但开始收到有关提供程序的错误。

\n
\n

\xe2\x95\xb7 \xe2\x94\x82 错误: 无法查询可用的提供程序包 \xe2\x94\x82 \xe2\x94\x82 无法\n检索提供程序 hashicorp/s3 的可用版本列表:\n提供程序注册表registry.terraform.io 没有名为\n\xe2\x94\x82 的提供程序registry.terraform.io/hashicorp/s3 \xe2\x94\x82 \xe2\x94\x82 所有模块都应指定\n其 required_providers,以便外部消费者在使用模块时将获得\n正确的提供者。要查看 \xe2\x94\x82 当前依赖于 hashicorp/s3 的模块,请运行以下命令: \xe2\x94\x82
\nterraformproviders

\n
\n

进行一些挖掘似乎 terraform 正在寻找模块registry.terraform.io/hashicorp/s3,该模块不存在。

\n

到目前为止,我已经尝试了以下方法:

\n
    \n
  • 验证 S3 资源代码符合 Hashicorp 今年升级到 4.x 的标准。另外,我已经使用它几个月了,没有任何问题。
  • \n
  • 删除 .terraform 目录并重新运行 terraform init (没有成功,同样的错误)
  • \n
  • 删除 .terraform 目录和 .terraform.hcl 锁定并运行 terraform init -upgrade (未成功)
  • \n
  • 我尝试更新我的提供商的文件以尝试强制升级(未成功)
  • \n
  • 我尝试将提供程序更改为 >= 当前版本以获取最新版本,但没有成功
  • \n
\n

进一步阅读,它指的是 terraform 模块的缓存问题。我尝试运行terraformproviderslock并收到此错误。

\n
\n

错误:无法检索用于锁定 \xe2\x94\x82 \xe2\x94\x82 的提供程序 …

amazon-web-services terraform terraform-provider-aws

0
推荐指数
1
解决办法
728
查看次数