2023-05-02 11:33:06 -04:00
|
|
|
// Copyright IBM Corp. 2014, 2026
|
2023-08-10 18:43:27 -04:00
|
|
|
// SPDX-License-Identifier: BUSL-1.1
|
2023-05-02 11:33:06 -04:00
|
|
|
|
2023-01-09 05:24:01 -05:00
|
|
|
package differ
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/zclconf/go-cty/cty"
|
|
|
|
|
|
2023-01-10 11:24:48 -05:00
|
|
|
"github.com/hashicorp/terraform/internal/command/jsonformat/computed"
|
|
|
|
|
"github.com/hashicorp/terraform/internal/command/jsonformat/computed/renderers"
|
2023-04-21 03:51:55 -04:00
|
|
|
"github.com/hashicorp/terraform/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
|
|
|
}
|