Skip to content

Commit fe942a4

Browse files
committed
remove ListResource call in ValidateListResourceConfig for proto6
1 parent e72b796 commit fe942a4

File tree

1 file changed

+0
-34
lines changed

1 file changed

+0
-34
lines changed

internal/proto6server/server_validatelistresourceconfig.go

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -33,40 +33,6 @@ func (s *Server) ValidateListResourceConfig(ctx context.Context, proto6Req *tfpr
3333
return toproto6.ValidateListResourceConfigResponse(ctx, fwResp), nil
3434
}
3535

36-
config, diags := fromproto6.Config(ctx, proto6Req.Config, listResourceSchema)
37-
38-
fwResp.Diagnostics.Append(diags...)
39-
40-
if diags.HasError() {
41-
return toproto6.ValidateListResourceConfigResponse(ctx, fwResp), nil
42-
}
43-
44-
resourceSchema, diags := s.FrameworkServer.ResourceSchema(ctx, proto6Req.TypeName)
45-
46-
fwResp.Diagnostics.Append(diags...)
47-
48-
if diags.HasError() {
49-
return toproto6.ValidateListResourceConfigResponse(ctx, fwResp), nil
50-
}
51-
52-
identitySchema, diags := s.FrameworkServer.ResourceIdentitySchema(ctx, proto6Req.TypeName)
53-
54-
fwResp.Diagnostics.Append(diags...)
55-
56-
if diags.HasError() {
57-
return toproto6.ValidateListResourceConfigResponse(ctx, fwResp), nil
58-
}
59-
60-
req := &fwserver.ListRequest{
61-
Config: config,
62-
ListResource: listResource,
63-
ResourceSchema: resourceSchema,
64-
ResourceIdentitySchema: identitySchema,
65-
}
66-
stream := &fwserver.ListResultsStream{}
67-
68-
s.FrameworkServer.ListResource(ctx, req, stream)
69-
7036
fwReq, diags := fromproto6.ValidateListResourceConfigRequest(ctx, proto6Req, listResource, listResourceSchema)
7137

7238
fwResp.Diagnostics.Append(diags...)

0 commit comments

Comments
 (0)