LoginSignup
3
0

More than 1 year has passed since last update.

Error: No valid credential sources found for AWS Provider. の対処法

Posted at

対象の読者

terraform 超初学者向けの記事となります。当たり前すぎることなのですが、自分はこれにつまずき、半日以上掛かりました。汗

問題

terraform plan を実行したら以下のエラーが発生しました。

Error: No valid credential sources found for AWS Provider.
    Please see https://terraform.io/docs/providers/aws/index.html for more information on
    providing credentials for the AWS Provider

原因

エラー文を読むと、どうやらAWSのクレデンシャル情報が見つからないということです。
じゃあ設定すればいいのかなと。

解決策

AWSのアクセスキーとシークレットアクセスキーを設定すれば解決します。
環境変数の設定を行いました。

export AWS_ACCESS_KEY_ID=***(自分のAWSアクセスキー)
export AWS_SECRET_ACCESS_KEY=***(自分のAWSシークレットアクセスキー)

これで terraform plan が実行できました。

3
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
3
0