aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/terraform/diff.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/terraform/diff.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/terraform/diff.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/vendor/github.com/hashicorp/terraform/terraform/diff.go b/vendor/github.com/hashicorp/terraform/terraform/diff.go
index 7a6ef3d..323462f 100644
--- a/vendor/github.com/hashicorp/terraform/terraform/diff.go
+++ b/vendor/github.com/hashicorp/terraform/terraform/diff.go
@@ -13,7 +13,6 @@ import (
13 "sync" 13 "sync"
14 14
15 "github.com/hashicorp/terraform/addrs" 15 "github.com/hashicorp/terraform/addrs"
16 "github.com/hashicorp/terraform/config"
17 "github.com/hashicorp/terraform/config/hcl2shim" 16 "github.com/hashicorp/terraform/config/hcl2shim"
18 "github.com/hashicorp/terraform/configs/configschema" 17 "github.com/hashicorp/terraform/configs/configschema"
19 "github.com/zclconf/go-cty/cty" 18 "github.com/zclconf/go-cty/cty"
@@ -665,7 +664,7 @@ func (d *InstanceDiff) applySingleAttrDiff(path []string, attrs map[string]strin
665 old, exists := attrs[currentKey] 664 old, exists := attrs[currentKey]
666 665
667 if diff != nil && diff.NewComputed { 666 if diff != nil && diff.NewComputed {
668 result[attr] = config.UnknownVariableValue 667 result[attr] = hcl2shim.UnknownVariableValue
669 return result, nil 668 return result, nil
670 } 669 }
671 670
@@ -673,7 +672,7 @@ func (d *InstanceDiff) applySingleAttrDiff(path []string, attrs map[string]strin
673 // This only applied to top-level "id" fields. 672 // This only applied to top-level "id" fields.
674 if attr == "id" && len(path) == 1 { 673 if attr == "id" && len(path) == 1 {
675 if old == "" { 674 if old == "" {
676 result[attr] = config.UnknownVariableValue 675 result[attr] = hcl2shim.UnknownVariableValue
677 } else { 676 } else {
678 result[attr] = old 677 result[attr] = old
679 } 678 }
@@ -704,8 +703,8 @@ func (d *InstanceDiff) applySingleAttrDiff(path []string, attrs map[string]strin
704 // check for missmatched diff values 703 // check for missmatched diff values
705 if exists && 704 if exists &&
706 old != diff.Old && 705 old != diff.Old &&
707 old != config.UnknownVariableValue && 706 old != hcl2shim.UnknownVariableValue &&
708 diff.Old != config.UnknownVariableValue { 707 diff.Old != hcl2shim.UnknownVariableValue {
709 return result, fmt.Errorf("diff apply conflict for %s: diff expects %q, but prior value has %q", attr, diff.Old, old) 708 return result, fmt.Errorf("diff apply conflict for %s: diff expects %q, but prior value has %q", attr, diff.Old, old)
710 } 709 }
711 710
@@ -723,7 +722,7 @@ func (d *InstanceDiff) applySingleAttrDiff(path []string, attrs map[string]strin
723 } 722 }
724 723
725 if attrSchema.Computed && diff.NewComputed { 724 if attrSchema.Computed && diff.NewComputed {
726 result[attr] = config.UnknownVariableValue 725 result[attr] = hcl2shim.UnknownVariableValue
727 return result, nil 726 return result, nil
728 } 727 }
729 728
@@ -756,7 +755,7 @@ func (d *InstanceDiff) applyCollectionDiff(path []string, attrs map[string]strin
756 } 755 }
757 756
758 if diff.NewComputed { 757 if diff.NewComputed {
759 result[k[len(prefix):]] = config.UnknownVariableValue 758 result[k[len(prefix):]] = hcl2shim.UnknownVariableValue
760 return result, nil 759 return result, nil
761 } 760 }
762 761