Skip to content

Commit

Permalink
Stop using json.Number when decoding Private.
Browse files Browse the repository at this point in the history
Our Timeouts code can't handle it yet.
  • Loading branch information
paddycarver committed Apr 22, 2021
1 parent 648b15a commit fb38bd7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/helper/plugin/grpc_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ func (s *GRPCProviderServer) ReadResource(_ context.Context, req *proto.ReadReso

private := make(map[string]interface{})
if len(req.Private) > 0 {
if err := unmarshalJSON(req.Private, &private); err != nil {
if err := json.Unmarshal(req.Private, &private); err != nil {
resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
return resp, nil
}
Expand Down Expand Up @@ -623,7 +623,7 @@ func (s *GRPCProviderServer) PlanResourceChange(_ context.Context, req *proto.Pl
}
priorPrivate := make(map[string]interface{})
if len(req.PriorPrivate) > 0 {
if err := unmarshalJSON(req.PriorPrivate, &priorPrivate); err != nil {
if err := json.Unmarshal(req.PriorPrivate, &priorPrivate); err != nil {
resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
return resp, nil
}
Expand Down Expand Up @@ -827,7 +827,7 @@ func (s *GRPCProviderServer) ApplyResourceChange(_ context.Context, req *proto.A

private := make(map[string]interface{})
if len(req.PlannedPrivate) > 0 {
if err := unmarshalJSON(req.PlannedPrivate, &private); err != nil {
if err := json.Unmarshal(req.PlannedPrivate, &private); err != nil {
resp.Diagnostics = convert.AppendProtoDiag(resp.Diagnostics, err)
return resp, nil
}
Expand Down

0 comments on commit fb38bd7

Please sign in to comment.