add test for computed map value

This ensures that a computed map can be correctly applied.
This commit is contained in:
James Bardin 2018-11-26 18:12:59 -05:00
parent c24a18d514
commit 622f5cc6fb
1 changed files with 20 additions and 0 deletions

View File

@ -473,3 +473,23 @@ resource "test_resource" "foo" {
},
})
}
func TestResource_unknownFuncInMap(t *testing.T) {
resource.UnitTest(t, resource.TestCase{
Providers: testAccProviders,
CheckDestroy: testAccCheckResourceDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: strings.TrimSpace(`
resource "test_resource" "foo" {
required = "ok"
required_map = {
key = "${uuid()}"
}
}
`),
ExpectNonEmptyPlan: true,
},
},
})
}