mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-03-14 04:01:09 -04:00
Ephemeral write only attributes (#3171)
Signed-off-by: Andrei Ciobanu <andrei.ciobanu@opentofu.org> Signed-off-by: Christian Mesh <christianmesh1@gmail.com>
This commit is contained in:
committed by
Christian Mesh
parent
cbe16d3a5d
commit
7f76707dd0
@@ -8,6 +8,7 @@ package differ
|
||||
import (
|
||||
"github.com/opentofu/opentofu/internal/command/jsonformat/computed"
|
||||
"github.com/opentofu/opentofu/internal/command/jsonformat/structured"
|
||||
"github.com/opentofu/opentofu/internal/plans"
|
||||
)
|
||||
|
||||
// asDiff is a helper function to abstract away some simple and common
|
||||
@@ -15,3 +16,10 @@ import (
|
||||
func asDiff(change structured.Change, renderer computed.DiffRenderer) computed.Diff {
|
||||
return computed.NewDiff(renderer, change.CalculateAction(), change.ReplacePaths.Matches())
|
||||
}
|
||||
|
||||
// asDiffWithInheritedAction is a specific implementation of asDiff that gets also a parentAction plans.Action.
|
||||
// This is used when the given change is known to always generate a NoOp diff, but it still should be shown
|
||||
// in the printed diff.
|
||||
func asDiffWithInheritedAction(change structured.Change, parentAction plans.Action, renderer computed.DiffRenderer) computed.Diff {
|
||||
return computed.NewDiff(renderer, parentAction, change.ReplacePaths.Matches())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user