我有以下deploy.tf
文件:
provider "aws" {
region = "us-east-1"
}
provider "aws" {
alias = "us_west_1"
region = "us-west-2"
}
resource "aws_us_east_1" "my_test" {
# provider = "aws.us_east_1"
count = 1
ami = "ami-0820..."
instance_type = "t2.micro"
}
resource "aws_us_west_1" "my_test" {
provider = "aws.us_west_1"
count = 1
ami = "ami-0d74..."
instance_type = "t2.micro"
}
我正在尝试使用它来部署 2 台服务器,每个地区一台。我不断收到以下错误:
aws_us_east_1.narc_test: Provider doesn't support resource: aws_us_east_1
我尝试为两个提供程序块设置别名,并以多种不同方式引用正确的区域。我已经阅读了多区域支持,一些答案表明这可以通过模块来完成,但是,这是一个简单的测试,我想保持简单。这目前可能吗?