mirror of
https://github.com/opentffoundation/opentf.git
synced 2026-05-20 12:02:01 -04:00
Structured Plan Renderer: Read the data source schemas from the right place (#32532)
* read the data source schemas from the right place * address comments and add test
This commit is contained in:
@@ -43,7 +43,7 @@ func precomputeDiffs(plan Plan, mode plans.Mode) diffs {
|
||||
continue
|
||||
}
|
||||
|
||||
schema := plan.ProviderSchemas[drift.ProviderName].ResourceSchemas[drift.Type]
|
||||
schema := plan.GetSchema(drift)
|
||||
diffs.drift = append(diffs.drift, diff{
|
||||
change: drift,
|
||||
diff: differ.FromJsonChange(drift.Change, relevantAttrs).ComputeDiffForBlock(schema.Block),
|
||||
@@ -51,7 +51,7 @@ func precomputeDiffs(plan Plan, mode plans.Mode) diffs {
|
||||
}
|
||||
|
||||
for _, change := range plan.ResourceChanges {
|
||||
schema := plan.ProviderSchemas[change.ProviderName].ResourceSchemas[change.Type]
|
||||
schema := plan.GetSchema(change)
|
||||
diffs.changes = append(diffs.changes, diff{
|
||||
change: change,
|
||||
diff: differ.FromJsonChange(change.Change, attribute_path.AlwaysMatcher()).ComputeDiffForBlock(schema.Block),
|
||||
|
||||
Reference in New Issue
Block a user