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"
}
Latest posts by rajeshkumar (see all)
- SonarQube Error: Error status returned by url [https://api.sonarcloud.io - September 5, 2024
- AWS SES Errors and Solution - September 2, 2024
- SRE Foundation Certification - August 29, 2024