github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/command/jsonformat/differ/primitive.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package differ 5 6 import ( 7 "github.com/zclconf/go-cty/cty" 8 9 "github.com/terramate-io/tf/command/jsonformat/computed" 10 "github.com/terramate-io/tf/command/jsonformat/computed/renderers" 11 "github.com/terramate-io/tf/command/jsonformat/structured" 12 ) 13 14 func computeAttributeDiffAsPrimitive(change structured.Change, ctype cty.Type) computed.Diff { 15 return asDiff(change, renderers.Primitive(change.Before, change.After, ctype)) 16 }