@@ -743,6 +743,7 @@ func (s *server) ReadResource(ctx context.Context, req *tfplugin5.ReadResource_R
743743 }
744744 logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "CurrentState" , r .CurrentState )
745745 logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "ProviderMeta" , r .ProviderMeta )
746+ logging .ProtocolPrivateData (ctx , s .protocolDataDir , rpc , "Request" , "Private" , r .Private )
746747 ctx = tf5serverlogging .DownstreamRequest (ctx )
747748 resp , err := s .downstream .ReadResource (ctx , r )
748749 if err != nil {
@@ -751,6 +752,7 @@ func (s *server) ReadResource(ctx context.Context, req *tfplugin5.ReadResource_R
751752 }
752753 tf5serverlogging .DownstreamResponse (ctx , resp .Diagnostics )
753754 logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Response" , "NewState" , resp .NewState )
755+ logging .ProtocolPrivateData (ctx , s .protocolDataDir , rpc , "Response" , "Private" , resp .Private )
754756 ret , err := toproto .ReadResource_Response (resp )
755757 if err != nil {
756758 logging .ProtocolError (ctx , "Error converting response to protobuf" , map [string ]interface {}{logging .KeyError : err })
@@ -776,6 +778,7 @@ func (s *server) PlanResourceChange(ctx context.Context, req *tfplugin5.PlanReso
776778 logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "PriorState" , r .PriorState )
777779 logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "ProposedNewState" , r .ProposedNewState )
778780 logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "ProviderMeta" , r .ProviderMeta )
781+ logging .ProtocolPrivateData (ctx , s .protocolDataDir , rpc , "Request" , "PriorPrivate" , r .PriorPrivate )
779782 ctx = tf5serverlogging .DownstreamRequest (ctx )
780783 resp , err := s .downstream .PlanResourceChange (ctx , r )
781784 if err != nil {
@@ -784,6 +787,7 @@ func (s *server) PlanResourceChange(ctx context.Context, req *tfplugin5.PlanReso
784787 }
785788 tf5serverlogging .DownstreamResponse (ctx , resp .Diagnostics )
786789 logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Response" , "PlannedState" , resp .PlannedState )
790+ logging .ProtocolPrivateData (ctx , s .protocolDataDir , rpc , "Response" , "PlannedPrivate" , resp .PlannedPrivate )
787791 ret , err := toproto .PlanResourceChange_Response (resp )
788792 if err != nil {
789793 logging .ProtocolError (ctx , "Error converting response to protobuf" , map [string ]interface {}{logging .KeyError : err })
@@ -807,8 +811,9 @@ func (s *server) ApplyResourceChange(ctx context.Context, req *tfplugin5.ApplyRe
807811 }
808812 logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "Config" , r .Config )
809813 logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "PlannedState" , r .PlannedState )
810- logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "Config" , r .Config )
811- logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "Config" , r .Config )
814+ logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "PriorState" , r .PriorState )
815+ logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Request" , "ProviderMeta" , r .ProviderMeta )
816+ logging .ProtocolPrivateData (ctx , s .protocolDataDir , rpc , "Request" , "PlannedPrivate" , r .PlannedPrivate )
812817 ctx = tf5serverlogging .DownstreamRequest (ctx )
813818 resp , err := s .downstream .ApplyResourceChange (ctx , r )
814819 if err != nil {
@@ -817,6 +822,7 @@ func (s *server) ApplyResourceChange(ctx context.Context, req *tfplugin5.ApplyRe
817822 }
818823 tf5serverlogging .DownstreamResponse (ctx , resp .Diagnostics )
819824 logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Response" , "NewState" , resp .NewState )
825+ logging .ProtocolPrivateData (ctx , s .protocolDataDir , rpc , "Response" , "Private" , resp .Private )
820826 ret , err := toproto .ApplyResourceChange_Response (resp )
821827 if err != nil {
822828 logging .ProtocolError (ctx , "Error converting response to protobuf" , map [string ]interface {}{logging .KeyError : err })
@@ -847,6 +853,7 @@ func (s *server) ImportResourceState(ctx context.Context, req *tfplugin5.ImportR
847853 tf5serverlogging .DownstreamResponse (ctx , resp .Diagnostics )
848854 for _ , importedResource := range resp .ImportedResources {
849855 logging .ProtocolData (ctx , s .protocolDataDir , rpc , "Response_ImportedResource" , "State" , importedResource .State )
856+ logging .ProtocolPrivateData (ctx , s .protocolDataDir , rpc , "Response_ImportedResource" , "Private" , importedResource .Private )
850857 }
851858 ret , err := toproto .ImportResourceState_Response (resp )
852859 if err != nil {
0 commit comments