使用Terraform 0.9.6当我尝试使用下面的代码创建现货车队时出现此错误,但是当我使用时 v0.11.7,它的工作原理。 Terraform doc是here。我的问题是我如何确定这是否是由于缺少v0.9.6功能或我是否正确使用语法。我怎么能找到这个?
我需要让运动队资源标签与v0.9.6一起使用。
错误:
* aws_spot_fleet_request.cheap_compute: launch_specification.0: invalid or unknown key: tags
代码:
# Request a Spot fleet
resource "aws_spot_fleet_request" "cheap_compute" {
iam_fleet_role = "arn:aws:iam::xxxxxxxxxxxxx:role/aws-service-role/spotfleet.amazonaws.com/AWSServiceRoleForEC2SpotFleet"
spot_price = "0.03"
allocation_strategy = "diversified"
target_capacity = 2
valid_until = "2018-07-21T20:44:20Z"
launch_specification {
instance_type = "t2.micro"
ami = "ami-1853ac65"
spot_price = "0.777"
availability_zone = "us-east-1a"
key_name = "${var.key_name}"
tags {
Name = "spot-fleet-example"}
}
}