From ebef145980fb582741a7846a42c1d29dafd44c89 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Wed, 23 May 2018 15:03:01 -0700 Subject: [PATCH] core: Update expected error message for plan countComputedModule test Previously we only handled the "count cannot be computed" check during validate, leaving other walks to just report "a number is required" (because "unknown" was represented as a special string) but now we have unknown as first-class we handle it during all walks, and so this error message is now the more appropriate one saying that the value is not yet known. --- terraform/context_plan_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/context_plan_test.go b/terraform/context_plan_test.go index 2dbe40a3f..c09e51454 100644 --- a/terraform/context_plan_test.go +++ b/terraform/context_plan_test.go @@ -1758,7 +1758,7 @@ func TestContext2Plan_countComputedModule(t *testing.T) { _, err := ctx.Plan() - expectedErr := "a number is required" + expectedErr := `The "count" value depends on resource attributes` if !strings.Contains(fmt.Sprintf("%s", err), expectedErr) { t.Fatalf("expected err would contain %q\nerr: %s\n", expectedErr, err)