@@ -1484,6 +1484,36 @@ func (s *server) InvokeAction(protoReq *tfplugin5.InvokeAction_Request, protoStr
14841484 return nil
14851485}
14861486
1487+ func (s * server ) GenerateResourceConfig (ctx context.Context , protoReq * tfplugin5.GenerateResourceConfig_Request ) (protoResp * tfplugin5.GenerateResourceConfig_Response , err error ) {
1488+ rpc := "GenerateResourceConfig"
1489+ ctx = s .loggingContext (ctx )
1490+ ctx = logging .RpcContext (ctx , rpc )
1491+ ctx = logging .GenerateResourceConfigContext (ctx , protoReq .TypeName )
1492+ ctx = s .stoppableContext (ctx )
1493+ logging .ProtocolTrace (ctx , "Received request" )
1494+ defer logging .ProtocolTrace (ctx , "Served request" )
1495+
1496+ req := fromproto .GenerateResourceConfigRequest (protoReq )
1497+
1498+ logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "State" , req .State )
1499+
1500+ ctx = tf5serverlogging .DownstreamRequest (ctx )
1501+
1502+ resp , err := s .downstream .GenerateResourceConfig (ctx , req )
1503+ if err != nil {
1504+ logging .ProtocolError (ctx , "Error from downstream" , map [string ]any {logging .KeyError : err })
1505+ return nil , err
1506+ }
1507+
1508+ tf5serverlogging .DownstreamResponse (ctx , resp .Diagnostics )
1509+
1510+ logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Response" , "Config" , resp .Config )
1511+
1512+ protoResp = toproto .GenerateResourceConfig_Response (resp )
1513+
1514+ return protoResp , nil
1515+ }
1516+
14871517func invalidDeferredResponseDiag (reason tfprotov5.DeferredReason ) * tfprotov5.Diagnostic {
14881518 return & tfprotov5.Diagnostic {
14891519 Severity : tfprotov5 .DiagnosticSeverityError ,
0 commit comments