MOTOSHARE 🚗🏍️

Rent Bikes & Cars Directly from Owners

Motoshare connects vehicle owners with people who need bikes and cars on rent. Owners earn from idle vehicles, and renters get flexible ride options.

Visit Motoshare

Terraform Error : validating provider credentials

Uncategorized

Error

C:\Users\Rajesh Kumar\Desktop\Terarform\proj1>terraform plan

Planning failed. Terraform encountered an error while generating this plan.

╷
│ Error: validating provider credentials: retrieving caller identity from STS: operation error STS: GetCallerIdentity, https response error StatusCode: 403, RequestID: 0604bfc9-6495-4ab4-8a3a-5c9261c747b5, api error InvalidClientTokenId: The security token included in the request is invalid.
│
│   with provider["registry.terraform.io/hashicorp/aws"],
│   on providers.tf line 18, in provider "aws":
│   18: provider "aws" {
│
╵

Answer

You must set AWS Provider credentials as per the cloud specification. Check below doc

https://registry.terraform.io/providers/hashicorp/aws/latest/docs

RIGHT CODE CAN BE LIKE THIS

provider "aws" {
  region     = "us-east-1"
  access_key = "SSSSSSSSSSSSSSSS"
  secret_key = "oSSSSSSSSSSSSSSSSSSSSSSS"
}
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x