From 5c31add2fc0191e122863dce66f943902f34c87b Mon Sep 17 00:00:00 2001 From: James Bardin Date: Thu, 23 Jul 2020 17:16:32 -0400 Subject: [PATCH] test data source index reference too --- terraform/context_apply_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/terraform/context_apply_test.go b/terraform/context_apply_test.go index e12f5e7b4..ee5d7622d 100644 --- a/terraform/context_apply_test.go +++ b/terraform/context_apply_test.go @@ -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") }