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