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 Dec 18, 2020
1 parent def5710 commit 09bbc7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helper/schema/grpc_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ func (s *GRPCProviderServer) ReadResource(ctx context.Context, req *tfprotov5.Re

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 @@ -663,7 +663,7 @@ func (s *GRPCProviderServer) PlanResourceChange(ctx context.Context, req *tfprot
}
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 @@ -877,7 +877,7 @@ func (s *GRPCProviderServer) ApplyResourceChange(ctx context.Context, req *tfpro

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 09bbc7a

Please sign in to comment.