我正在将shared_cred_file用于aws提供商。以 aws 提供程序版本 3.63 为例,terraform plan 效果很好。
\n当我使用 aws 提供程序 4.0 时,它提示我对共享凭证文件使用应用更改设置。修改后没有报错,但还是第二个错误
\n可能是什么问题呢?
\nWarning: 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)