错误:配置 Terraform AWS 提供商时出错:
验证提供程序凭据时出错:调用 sts:GetCallerIdentity 时出错:操作错误 STS:GetCallerIdentity,https 响应错误 StatusCode:403,RequestID:95e52463-8cd7-038-b924-3a5d4ad6ef03,api 错误 InvalidClientTokenId:请求中包含的安全令牌无效。与提供者[“registry.terraform.io/hashicorp/aws”],在provider.tf第1行,在提供者“aws”中:1:提供者“aws”{
我只有两个文件。
resource "aws_instance" "web" {
ami = "ami-068257025f72f470d"
instance_type = "t2.micro"
tags = {
Name = "instance_using_terraform"
}
}
Run Code Online (Sandbox Code Playgroud)
provider "aws" {
region = "ap-east-1"
access_key = "xxxx"
secret_key = "xxxx/xxx+xxx"
}
Run Code Online (Sandbox Code Playgroud)
amazon-ec2 amazon-web-services terraform terraform-provider-aws