From 7c56550633eec5e5a2142f3589ef3542c8b7a7ad Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 4 Sep 2015 08:07:16 -0700 Subject: [PATCH] In plan summary, be more honest about force-new changes. Previously the plan summary output would consider -/+ diffs as changes even though they actually destroy and create instances. This was misleadning and inconsistent with the accounting that gets done for the similar summary written out after "apply". Instead we now count the -/+ diffs as both adds and removes, which should mean that the counts output in the plan summary should match those in the apply summary, as long as no errors occur during apply. This fixes #3163. --- command/plan.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/command/plan.go b/command/plan.go index f5a478873..15c2b505f 100644 --- a/command/plan.go +++ b/command/plan.go @@ -136,9 +136,9 @@ func (c *PlanCommand) Run(args []string) int { c.Ui.Output(c.Colorize().Color(fmt.Sprintf( "[reset][bold]Plan:[reset] "+ "%d to add, %d to change, %d to destroy.", - countHook.ToAdd, - (countHook.ToChange + countHook.ToRemoveAndAdd), - countHook.ToRemove))) + countHook.ToAdd+countHook.ToRemoveAndAdd, + countHook.ToChange, + countHook.ToRemove+countHook.ToRemoveAndAdd))) if detailed { return 2