Don't save PathValueMarks on instance_object

This commit is contained in:
Pam Selle 2020-09-09 12:07:07 -04:00
parent 3723594b3d
commit 843ed8911b
1 changed files with 1 additions and 6 deletions

View File

@ -19,9 +19,6 @@ type ResourceInstanceObject struct {
// Terraform. // Terraform.
Value cty.Value Value cty.Value
// PathValueMarks is a slice of paths and value marks of the value
PathValueMarks []cty.PathValueMarks
// Private is an opaque value set by the provider when this object was // Private is an opaque value set by the provider when this object was
// last created or updated. Terraform Core does not use this value in // last created or updated. Terraform Core does not use this value in
// any way and it is not exposed anywhere in the user interface, so // any way and it is not exposed anywhere in the user interface, so
@ -104,9 +101,7 @@ func (o *ResourceInstanceObject) Encode(ty cty.Type, schemaVersion uint64) (*Res
// If it contains marks, dump those now // If it contains marks, dump those now
unmarked := val unmarked := val
if val.ContainsMarked() { if val.ContainsMarked() {
var pvm []cty.PathValueMarks unmarked, _ = val.UnmarkDeep()
unmarked, pvm = val.UnmarkDeepWithPaths()
o.PathValueMarks = pvm
} }
src, err := ctyjson.Marshal(unmarked, ty) src, err := ctyjson.Marshal(unmarked, ty)
if err != nil { if err != nil {