mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-02-16 16:00:37 -05:00
* remove attributes that do not match the relevant attributes filter * fix formatting * fix renderer function, don't drop irrelevant attributes just mark them as no-ops * fix imports * fix bugs in the renderer exposed by the equivalence tests * imports * gofmt
22 lines
644 B
Go
22 lines
644 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, change.BeforeExplicit, change.AfterExplicit, change.RelevantAttributes)
|
|
}
|