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.
This commit is contained in:
James Bardin 2017-12-19 15:15:39 -05:00
parent 7a8a443994
commit 643ef4334f
1 changed files with 6 additions and 0 deletions

View File

@ -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,