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