From 3b6deef29685279dbd1d022ac7597eaf8ebeeecc Mon Sep 17 00:00:00 2001 From: James Bardin Date: Mon, 15 Oct 2018 21:08:01 -0400 Subject: [PATCH] reset plan changes every call to Plan. Tests often call Plan multiple times on the same context to verify there are no changes, so we need to make sure changes don't accumulate. --- terraform/context.go | 1 + 1 file changed, 1 insertion(+) diff --git a/terraform/context.go b/terraform/context.go index a817f3c8a..d27204001 100644 --- a/terraform/context.go +++ b/terraform/context.go @@ -489,6 +489,7 @@ func (c *Context) Apply() (*states.State, tfdiags.Diagnostics) { // by the plan, so Apply can be called after. func (c *Context) Plan() (*plans.Plan, tfdiags.Diagnostics) { defer c.acquireRun("plan")() + c.changes = plans.NewChanges() var diags tfdiags.Diagnostics