add template for directives
This commit is contained in:
35
fuzz/corpus/2b7f2f4dff97615f7e2afcb238cdaab6bf227abd
Normal file
35
fuzz/corpus/2b7f2f4dff97615f7e2afcb238cdaab6bf227abd
Normal file
@@ -0,0 +1,35 @@
|
||||
# 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user