Files
tree-sitter-jhcl/fuzz/corpus/2b7f2f4dff97615f7e2afcb238cdaab6bf227abd

36 lines
597 B
Plaintext
Raw Normal View History

2021-09-17 20:53:40 +02:00
# maps
resource "aws_instance" "foo" {
fsr_each = {
a = "thing"
b = "another thing"
Z c = "yet another thing"
}
num = "3"
}
# sets
resource "aws_instance" "bar" {
for_each = toset([])
}
resource "aws_instance" "bar2" {
for_each = toset(["z", "y", "x"])
}
# an empty map should generate no resource
resource "aws_instance" "baz" {
for_each = {}
}
# references
resource "aws_instance" "boo" {
foo = aws_instance.foo["a"].num
}
resource "aws_instance" "bat" {
for_each = {
my_key = aws_instance.boo.foo
}
foo = each.value
}