test data source index reference too

This commit is contained in:
James Bardin 2020-07-23 17:16:32 -04:00
parent 7d3cd5bc43
commit 5c31add2fc
1 changed files with 3 additions and 2 deletions

View File

@ -8754,11 +8754,12 @@ resource "null_instance" "write" {
}
data "null_data_source" "read" {
count = 1
depends_on = ["null_instance.write"]
}
resource "null_instance" "depends" {
foo = data.null_data_source.read.foo
foo = data.null_data_source.read[0].foo
}
`})
@ -8804,7 +8805,7 @@ resource "null_instance" "depends" {
Mode: addrs.DataResourceMode,
Type: "null_data_source",
Name: "read",
}.Instance(addrs.NoKey))
}.Instance(addrs.IntKey(0)))
if is == nil {
t.Fatal("data resource instance is not present in state; should be")
}