0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

terraformで「「Error: error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found.」というエラーが発生した件

Posted at

terraformを実行しようとすると、「Error: error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found.」というエラーに直面しましたので、解決法を備忘録して記録します。

事象

terraform applyなどを実行すると以下のようなエラーが発生。

│ Error: error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found.

│ Please see https://registry.terraform.io/providers/hashicorp/aws
│ for more information about providing credentials.

│ Error: NoCredentialProviders: no valid providers in chain
│ caused by: EnvAccessKeyNotFound: failed to find credentials in the environment.

解決法

your_access_keyとyour_secret_keyをそれぞれ自分のものに置き換えて以下の方法で環境変数を設定する。

export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key

おわりに

久々に使うと予期せぬエラーが出て困りました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?