小编ti_*_*key的帖子

找不到 Terraform AWS 提供商的有效凭证源

我正在将shared_cred_file用于aws提供商。以 aws 提供程序版本 3.63 为例,terraform plan 效果很好。

\n

当我使用 aws 提供程序 4.0 时,它提示我对共享凭证文件使用应用更改设置。修改后没有报错,但还是第二个错误

\n

可能是什么问题呢?

\n
Warning: Argument is deprecated\n\xe2\x94\x82\n\xe2\x94\x82   with provider[\xe2\x80\x9cregistry.terraform.io/hashicorp/aws\xe2\x80\x9d],\n\xe2\x94\x82   on main.tf line 15, in provider \xe2\x80\x9caws\xe2\x80\x9d:\n\xe2\x94\x82   15:   shared_credentials_file = \xe2\x80\x9c~/.aws/credentials\xe2\x80\x9d\n\xe2\x94\x82\n\xe2\x94\x82 Use shared_credentials_files instead.\n\xe2\x94\x82\n\xe2\x94\x82 (and one more similar warning elsewhere)\n\xe2\x95\xb5\n\xe2\x95\xb7\n\xe2\x94\x82 Error: error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found.\n\xe2\x94\x82\n\xe2\x94\x82 Please see https://registry.terraform.io/providers/hashicorp/aws\n\xe2\x94\x82 for more information about providing credentials.\n\xe2\x94\x82\n\xe2\x94\x82 Error: no EC2 IMDS role found, operation error ec2imds: GetMetadata, canceled, context deadline exceeded\n\xe2\x94\x82\n\xe2\x94\x82\n\xe2\x94\x82 …
Run Code Online (Sandbox Code Playgroud)

credentials amazon-web-services terraform

4
推荐指数
1
解决办法
2万
查看次数