From b0193253b92fee017e6fcbf646149b635a0f5159 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Mon, 10 Sep 2018 14:47:20 -0700 Subject: [PATCH] core: Fix TestContext2Apply_resourceCountOneList We've intentionally changed the behavior for "count = 1" so that it'll assign an index to the created instance even though there's only one. The un-indexed behavior now applies only if count isn't set _at all_, thus avoiding weird behavior if a count is _dynamically_ set to 1 via an expression but is assumed to be a list elsewhere in configuration. --- terraform/context_apply_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/context_apply_test.go b/terraform/context_apply_test.go index 3aa9176dd..be36e0aab 100644 --- a/terraform/context_apply_test.go +++ b/terraform/context_apply_test.go @@ -182,7 +182,7 @@ func TestContext2Apply_resourceCountOneList(t *testing.T) { assertNoDiagnostics(t, diags) got := strings.TrimSpace(state.String()) - want := strings.TrimSpace(`null_resource.foo: + want := strings.TrimSpace(`null_resource.foo.0: ID = foo provider = provider.null