Skip to content

Commit 2cefb8d

Browse files
use the valueshim type instead of the schema map
1 parent 653b53e commit 2cefb8d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pkg/tfbridge/rawstate.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -643,13 +643,10 @@ func (ih *rawStateDeltaHelper) computeDeltaAt(
643643
}
644644
}
645645

646-
tfs, _, err := LookupSchemas(path, ih.schemaMap, ih.schemaInfos)
646+
schType, err := walk.LookupType(path, ih.schemaType)
647647
if err == nil {
648-
if tfs.Type() == shim.TypeDynamic {
649-
relevantSchemaType, err := walk.LookupType(path, ih.schemaType)
650-
contract.AssertNoErrorf(err, "LookupType failed")
651-
652-
return RawStateDelta{Replace: &replaceDelta{Raw: newRawStateFromValue(relevantSchemaType, v)}}, nil
648+
if schType.IsDynamicType() {
649+
return RawStateDelta{Replace: &replaceDelta{Raw: newRawStateFromValue(schType, v)}}, nil
653650
}
654651
}
655652

0 commit comments

Comments
 (0)