Skip to content

Commit 43a7497

Browse files
committed
fromproto: continue implementation of UpgradeResourceStateResponse by returning upgraded state
1 parent c0dddca commit 43a7497

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tfprotov5/internal/fromproto/resource.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ func UpgradeResourceStateResponse(in *tfplugin5.UpgradeResourceState_Response) (
4343
if err != nil {
4444
return nil, err
4545
}
46-
return &tfprotov5.UpgradeResourceStateResponse{
46+
resp := &tfprotov5.UpgradeResourceStateResponse{
4747
Diagnostics: diags,
48-
}, nil
48+
}
49+
if in.UpgradedState != nil {
50+
resp.UpgradedState = DynamicValue(in.UpgradedState)
51+
}
52+
return resp, nil
4953
}
5054

5155
func ReadResourceRequest(in *tfplugin5.ReadResource_Request) (*tfprotov5.ReadResourceRequest, error) {

0 commit comments

Comments
 (0)