mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-02-22 14:00:57 -05:00
* pause implementation * change -> diff, value -> change * add support for json and multiline strings to the primitive renderer * goimports * remove unused function * go fmt * address comments
22 lines
572 B
Go
22 lines
572 B
Go
package differ
|
|
|
|
import (
|
|
"github.com/zclconf/go-cty/cty"
|
|
|
|
"github.com/hashicorp/terraform/internal/command/jsonformat/computed"
|
|
"github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers"
|
|
)
|
|
|
|
func (change Change) ComputeDiffForOutput() computed.Diff {
|
|
if sensitive, ok := change.checkForSensitiveType(cty.DynamicPseudoType); ok {
|
|
return sensitive
|
|
}
|
|
|
|
if unknown, ok := change.checkForUnknownType(cty.DynamicPseudoType); ok {
|
|
return unknown
|
|
}
|
|
|
|
jsonOpts := renderers.RendererJsonOpts()
|
|
return jsonOpts.Transform(change.Before, change.After)
|
|
}
|