VT
tg state list -> tg state move
Size: a a a
VT
VT
AK
A.
Error: Syntax error in configuration file
on network.tf line 18, in resource "aws_subnet" "demo":
18: availability_zone = data.aws_availability_zones.available.names[count.index]
Error while parsing: At 18:24: Unknown token: 18:24 IDENT
data.aws_availability_zones.available.names
РР
A.
$ terraform version
Terraform v0.12.20
РР
A.
A
РР
data.aws_availability_zones.available.[count.index]
.names в ресурсах. A.
resource "aws_subnet" "demo" {
count = 2
availability_zone = data.aws_availability_zones.available.names[count.index]
cidr_block = "10.0.${count.index}.0/24"
vpc_id = aws_vpc.demo.id
tags = {
"Name" = "terraform-eks-demo-node"
"kubernetes.io/cluster/${var.cluster-name}" = "shared"
}
}
VT
РР
A.
VT
A
resource "aws_subnet" "demo" {
count = 2
availability_zone = data.aws_availability_zones.available.names[count.index]
cidr_block = "10.0.${count.index}.0/24"
vpc_id = aws_vpc.demo.id
tags = {
"Name" = "terraform-eks-demo-node"
"kubernetes.io/cluster/${var.cluster-name}" = "shared"
}
}
data.aws_availability_zones.available.names
сколько элементов?element()
A.
data.aws_availability_zones.available.names
сколько элементов?element()
flatten(["${aws_subnet.demo.*.id}"])
A
A
aws_subnet.demo.*.id
работатьA
[]