diff --git a/config/interpolate_walk_test.go b/config/interpolate_walk_test.go index c27770e59..e1ff006a3 100644 --- a/config/interpolate_walk_test.go +++ b/config/interpolate_walk_test.go @@ -33,6 +33,26 @@ func TestInterpolationWalker_detect(t *testing.T) { }, }, + { + Input: map[string]interface{}{ + "foo": "${aws_instance.foo.*.num}", + }, + Result: []Interpolation{ + &VariableInterpolation{ + Variable: &ResourceVariable{ + Type: "aws_instance", + Name: "foo", + Field: "num", + + Multi: true, + Index: -1, + + key: "aws_instance.foo.*.num", + }, + }, + }, + }, + { Input: map[string]interface{}{ "foo": "${lookup(var.foo)}",