mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
Structured Renderer: use the new renderer when rendering the state in addition to the plan (#32629)
* Use the new renderer when rendering the state * remove confusing and unneeded comment
This commit is contained in:
@@ -39,9 +39,6 @@ const (
|
||||
ResourceInstanceDeleteBecauseNoMoveTarget = "delete_because_no_move_target"
|
||||
ResourceInstanceReadBecauseConfigUnknown = "read_because_config_unknown"
|
||||
ResourceInstanceReadBecauseDependencyPending = "read_because_dependency_pending"
|
||||
|
||||
ManagedResourceMode = "managed"
|
||||
DataResourceMode = "data"
|
||||
)
|
||||
|
||||
// Plan is the top-level representation of the json format of a plan. It includes
|
||||
@@ -448,9 +445,9 @@ func MarshalResourceChanges(resources []*plans.ResourceInstanceChangeSrc, schema
|
||||
|
||||
switch addr.Resource.Resource.Mode {
|
||||
case addrs.ManagedResourceMode:
|
||||
r.Mode = ManagedResourceMode
|
||||
r.Mode = jsonstate.ManagedResourceMode
|
||||
case addrs.DataResourceMode:
|
||||
r.Mode = DataResourceMode
|
||||
r.Mode = jsonstate.DataResourceMode
|
||||
default:
|
||||
return nil, fmt.Errorf("resource %s has an unsupported mode %s", r.Address, addr.Resource.Resource.Mode.String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user