1
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.

Error:error configuring Terraform AWS Provider: error validating provider credentials: error calling sts:GetCallerIdentity: InvalidClientTokenId: The security token included in the request is invalid.

Posted at

What's This

TFリソースを削除しようとしたら、エラー。
エラー内容通りだったので、すぐ解決できた。

Error Details

terraform destroy

で、構築したTFリソースを削除しようとしたら、以下エラー。

error configuring Terraform AWS Provider: error validating provider credentials:
 error calling sts:GetCallerIdentity: InvalidClientTokenId: 
The security token included in the request is invalid
        status code: 403, request id:"XXXXXXXXXX"

Cause of failure

applyの際に使用していた、IAM ユーザーを削除していたからでした。

How to resolve

再度、IAMユーザー作成して、シークレットキーとアクセスキーをenvファイルに入れてdestroyしたら、通りました。

ほか

TFはコマンド1つで簡単にリソースをdestroyできるので、楽ですね。

1
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
1
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?