From 643ef4334f8ce254cd182dbe514cd99537aef30c Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 19 Dec 2017 15:15:39 -0500 Subject: [PATCH] revert the change that broke the test case This reverts one of the changes from 6a4f7b0, which broke empty strings being seen as unset for computed values. This breaks a number of other tests, and is only an intermediate change for evaluating other solutions. --- helper/schema/schema.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helper/schema/schema.go b/helper/schema/schema.go index 6cc71df51..3eff0a380 100644 --- a/helper/schema/schema.go +++ b/helper/schema/schema.go @@ -337,6 +337,12 @@ func (s *Schema) finalizeDiff( return d } + if s.Computed && d.NewComputed && d.Old != "" && d.New == "" { + // old case where we pretended that a NewComputed value of "" on a + // Computed field was unset + return nil + } + if s.Computed && !d.NewComputed { if d.Old != "" && d.New == "" { // This is a computed value with an old value set already,