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 で AWS SSO で認証できない場合の解消法

0
Posted at

terraform環境

$ terraform -version
Terraform v1.6.1
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v5.34.0

Your version of Terraform is out of date! The latest version
is 1.7.1. You can update by downloading from https://www.terraform.io/downloads.html

terraform applyの結果

$ terraform apply

 Error: Invalid provider configuration
 
 Provider "registry.terraform.io/hashicorp/aws" requires explicit configuration. Add a provider block to the root module and configure the provider's required arguments as described in the provider
 documentation.
 


 Error: No valid credential sources found
 
   with provider["registry.terraform.io/hashicorp/aws"],
   on <empty> line 0:
   (source code not available)
 
 Please see https://registry.terraform.io/providers/hashicorp/aws
 for more information about providing credentials.
 
 Error: failed to refresh cached credentials, refresh cached SSO token failed, unable to refresh SSO token, operation error SSO OIDC: CreateToken, https response error StatusCode: 400, RequestID:
 efb20f89-cfa8-4ac0-a37d-d5960f1201a8, InvalidGrantException: 

解消方法

$ aws sso login
Attempting to automatically open the SSO authorization page in your default browser.
If the browser does not open or you wish to use a different device to authorize this request, open the following URL:

https://device.sso.ap-northeast-1.amazonaws.com/

Then enter the code:

KPMK-GKSW
Successfully logged into Start URL: https://d-1234.awsapps.com/start
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?