config: additional tests for sanity

This commit is contained in:
Mitchell Hashimoto 2014-08-05 10:11:56 -07:00
parent a74775d077
commit b19a976696
1 changed files with 20 additions and 0 deletions

View File

@ -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)}",