【发布时间】:2019-12-29 21:01:00
【问题描述】:
我正在学习 Udemy 的 Terraform 课程“Learn DevOps: Infrastructure Automation With Terraform”。根据练习“terraform 中的第一步 - 启动实例”,当我运行“instance.tf”时,我收到以下错误。
Error: Error launching source instance: Unsupported: The requested configuration is currently not supported. Please check the documentation for supported configurations.
status code: 400, request id: cbfbb2e8-35bd-4527-8da3-b59506c55b81
on instance.tf line 7, in resource "aws_instance" "example":
7: resource "aws_instance" "example" {
这是我的 instance.tf 文件。
provider "aws" {
access_key = "XXXXXXXXXXXXXXXXXX"
secret_key = "XXXXXXXXXXXXXXXXXXXXXXXXXX"
region = "ap-south-1"
}
resource "aws_instance" "example" {
ami = "ami-0e175be6acf8b637d"
instance_type = "t2.micro"
}
请帮忙。
【问题讨论】:
-
对于那些从谷歌来到这里的人,这个错误通常意味着您选择的某些资源选项不可用。在我的情况下,所选区域没有“t2.micro”实例大小。
标签: terraform terraform-provider-aws