2023-05-02 10:33:06 -05:00
|
|
|
// Copyright (c) HashiCorp, Inc.
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2023-01-09 04:24:01 -06:00
|
|
|
package differ
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/zclconf/go-cty/cty"
|
|
|
|
|
2023-08-17 07:45:11 -05:00
|
|
|
"github.com/placeholderplaceholderplaceholder/opentf/internal/command/jsonformat/computed"
|
|
|
|
"github.com/placeholderplaceholderplaceholder/opentf/internal/command/jsonformat/computed/renderers"
|
|
|
|
"github.com/placeholderplaceholderplaceholder/opentf/internal/command/jsonformat/structured"
|
2023-01-09 04:24:01 -06:00
|
|
|
)
|
|
|
|
|
2023-04-21 02:51:55 -05:00
|
|
|
func computeAttributeDiffAsPrimitive(change structured.Change, ctype cty.Type) computed.Diff {
|
|
|
|
return asDiff(change, renderers.Primitive(change.Before, change.After, ctype))
|
2023-01-09 04:24:01 -06:00
|
|
|
}
|