Skip to content

Commit 388806f

Browse files
committed
Started adding ListResourceRPC
1 parent fd9eb23 commit 388806f

File tree

16 files changed

+793
-32
lines changed

16 files changed

+793
-32
lines changed

go.mod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ toolchain go1.23.7
66

77
require (
88
github.com/google/go-cmp v0.7.0
9-
github.com/hashicorp/terraform-plugin-go v0.28.1-0.20250604150620-c6d59498a4e1
9+
github.com/hashicorp/terraform-plugin-go v0.28.1-0.20250612152444-53272eefdb72
1010
github.com/hashicorp/terraform-plugin-log v0.9.0
11-
google.golang.org/grpc v1.72.2
11+
google.golang.org/grpc v1.73.0
1212
)
1313

1414
require (
@@ -17,7 +17,7 @@ require (
1717
github.com/hashicorp/go-hclog v1.5.0 // indirect
1818
github.com/hashicorp/go-plugin v1.6.3 // indirect
1919
github.com/hashicorp/go-uuid v1.0.3 // indirect
20-
github.com/hashicorp/terraform-registry-address v0.2.5 // indirect
20+
github.com/hashicorp/terraform-registry-address v0.3.0 // indirect
2121
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
2222
github.com/hashicorp/yamux v0.1.1 // indirect
2323
github.com/mattn/go-colorable v0.1.12 // indirect
@@ -26,9 +26,9 @@ require (
2626
github.com/oklog/run v1.0.0 // indirect
2727
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
2828
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
29-
golang.org/x/net v0.39.0 // indirect
30-
golang.org/x/sys v0.32.0 // indirect
31-
golang.org/x/text v0.24.0 // indirect
32-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
29+
golang.org/x/net v0.41.0 // indirect
30+
golang.org/x/sys v0.33.0 // indirect
31+
golang.org/x/text v0.26.0 // indirect
32+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 // indirect
3333
google.golang.org/protobuf v1.36.6 // indirect
3434
)

go.sum

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ github.com/hashicorp/go-plugin v1.6.3 h1:xgHB+ZUSYeuJi96WtxEjzi23uh7YQpznjGh0U0U
2121
github.com/hashicorp/go-plugin v1.6.3/go.mod h1:MRobyh+Wc/nYy1V4KAXUiYfzxoYhs7V1mlH1Z7iY2h0=
2222
github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8=
2323
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
24-
github.com/hashicorp/terraform-plugin-go v0.28.1-0.20250604150620-c6d59498a4e1 h1:TbYGMFWFJDeGgLf5r/vZ8U7sV/f8dg3PR/tDDV4lw/I=
25-
github.com/hashicorp/terraform-plugin-go v0.28.1-0.20250604150620-c6d59498a4e1/go.mod h1:2t+AK4nKnRw39xPaCHHEMz79e8BIZoEWsSsVUkC8jVU=
24+
github.com/hashicorp/terraform-plugin-go v0.28.1-0.20250612152444-53272eefdb72 h1:hi/mixv0JfFu6gfADLdFvq5S+HDSpldIgOdz+FfdUEU=
25+
github.com/hashicorp/terraform-plugin-go v0.28.1-0.20250612152444-53272eefdb72/go.mod h1:hL//wLEfYo0YVt0TC/VLzia/ADQQto3HEm4/jX2gkdY=
2626
github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0=
2727
github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow=
28-
github.com/hashicorp/terraform-registry-address v0.2.5 h1:2GTftHqmUhVOeuu9CW3kwDkRe4pcBDq0uuK5VJngU1M=
29-
github.com/hashicorp/terraform-registry-address v0.2.5/go.mod h1:PpzXWINwB5kuVS5CA7m1+eO2f1jKb5ZDIxrOPfpnGkg=
28+
github.com/hashicorp/terraform-registry-address v0.3.0 h1:HMpK3nqaGFPS9VmgRXrJL/dzHNdheGVKk5k7VlFxzCo=
29+
github.com/hashicorp/terraform-registry-address v0.3.0/go.mod h1:jRGCMiLaY9zii3GLC7hqpSnwhfnCN5yzvY0hh4iCGbM=
3030
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
3131
github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc=
3232
github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE=
@@ -56,32 +56,32 @@ github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAh
5656
github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds=
5757
go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
5858
go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
59-
go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
60-
go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
61-
go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
62-
go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
63-
go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
64-
go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
65-
go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
66-
go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
67-
go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
68-
go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
69-
golang.org/x/net v0.39.0 h1:ZCu7HMWDxpXpaiKdhzIfaltL9Lp31x/3fCP11bc6/fY=
70-
golang.org/x/net v0.39.0/go.mod h1:X7NRbYVEA+ewNkCNyJ513WmMdQ3BineSwVtN2zD/d+E=
59+
go.opentelemetry.io/otel v1.35.0 h1:xKWKPxrxB6OtMCbmMY021CqC45J+3Onta9MqjhnusiQ=
60+
go.opentelemetry.io/otel v1.35.0/go.mod h1:UEqy8Zp11hpkUrL73gSlELM0DupHoiq72dR+Zqel/+Y=
61+
go.opentelemetry.io/otel/metric v1.35.0 h1:0znxYu2SNyuMSQT4Y9WDWej0VpcsxkuklLa4/siN90M=
62+
go.opentelemetry.io/otel/metric v1.35.0/go.mod h1:nKVFgxBZ2fReX6IlyW28MgZojkoAkJGaE8CpgeAU3oE=
63+
go.opentelemetry.io/otel/sdk v1.35.0 h1:iPctf8iprVySXSKJffSS79eOjl9pvxV9ZqOWT0QejKY=
64+
go.opentelemetry.io/otel/sdk v1.35.0/go.mod h1:+ga1bZliga3DxJ3CQGg3updiaAJoNECOgJREo9KHGQg=
65+
go.opentelemetry.io/otel/sdk/metric v1.35.0 h1:1RriWBmCKgkeHEhM7a2uMjMUfP7MsOF5JpUCaEqEI9o=
66+
go.opentelemetry.io/otel/sdk/metric v1.35.0/go.mod h1:is6XYCUMpcKi+ZsOvfluY5YstFnhW0BidkR+gL+qN+w=
67+
go.opentelemetry.io/otel/trace v1.35.0 h1:dPpEfJu1sDIqruz7BHFG3c7528f6ddfSWfFDVt/xgMs=
68+
go.opentelemetry.io/otel/trace v1.35.0/go.mod h1:WUk7DtFp1Aw2MkvqGdwiXYDZZNvA/1J8o6xRXLrIkyc=
69+
golang.org/x/net v0.41.0 h1:vBTly1HeNPEn3wtREYfy4GZ/NECgw2Cnl+nK6Nz3uvw=
70+
golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA=
7171
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
7272
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
7373
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
7474
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
7575
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
7676
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
77-
golang.org/x/sys v0.32.0 h1:s77OFDvIQeibCmezSnk/q6iAfkdiQaJi4VzroCFrN20=
78-
golang.org/x/sys v0.32.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
79-
golang.org/x/text v0.24.0 h1:dd5Bzh4yt5KYA8f9CJHCP4FB4D51c2c6JvN37xJJkJ0=
80-
golang.org/x/text v0.24.0/go.mod h1:L8rBsPeo2pSS+xqN0d5u2ikmjtmoJbDBT1b7nHvFCdU=
81-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a h1:51aaUVRocpvUOSQKM6Q7VuoaktNIaMCLuhZB6DKksq4=
82-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a/go.mod h1:uRxBH1mhmO8PGhU89cMcHaXKZqO+OfakD8QQO0oYwlQ=
83-
google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8=
84-
google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
77+
golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw=
78+
golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
79+
golang.org/x/text v0.26.0 h1:P42AVeLghgTYr4+xUnTRKDMqpar+PtX7KWuNQL21L8M=
80+
golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA=
81+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463 h1:e0AIkUUhxyBKh6ssZNrAMeqhA7RKUj42346d1y02i2g=
82+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250324211829-b45e905df463/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A=
83+
google.golang.org/grpc v1.73.0 h1:VIWSmpI2MegBtTuFt5/JWy2oXxtjJ/e89Z70ImfD2ok=
84+
google.golang.org/grpc v1.73.0/go.mod h1:50sbHOUqWoCQGI8V2HQLJM0B+LMlIUjNSZmow7EVBQc=
8585
google.golang.org/protobuf v1.36.6 h1:z1NpPI8ku2WgiWnf+t9wTPsn6eP1L7ksHUlkfLvd9xY=
8686
google.golang.org/protobuf v1.36.6/go.mod h1:jduwjTPXsFjZGTmRluh+L6NjiWu7pchiJ2/5YcXBHnY=
8787
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=

internal/tf5testserver/tf5testserver.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ type TestServer struct {
6666
ValidateResourceTypeConfigCalled map[string]bool
6767

6868
ValidateListResourceConfigCalled map[string]bool
69+
70+
ListResourceCalled map[string]bool
6971
}
7072

7173
func (s *TestServer) ProviderServer() tfprotov5.ProviderServer {
@@ -284,3 +286,12 @@ func (s *TestServer) PrepareProviderConfig(_ context.Context, req *tfprotov5.Pre
284286
s.PrepareProviderConfigCalled = true
285287
return s.PrepareProviderConfigResponse, nil
286288
}
289+
290+
func (s *TestServer) ListResource(_ context.Context, req *tfprotov5.ListResourceRequest) (*tfprotov5.ListResourceServerStream, error) {
291+
if s.ListResourceCalled == nil {
292+
s.ListResourceCalled = make(map[string]bool)
293+
}
294+
295+
s.ListResourceCalled[req.TypeName] = true
296+
return nil, nil
297+
}

internal/tf6testserver/tf6testserver.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ type TestServer struct {
6666
ValidateResourceConfigCalled map[string]bool
6767

6868
ValidateListResourceConfigCalled map[string]bool
69+
70+
ListResourceCalled map[string]bool
6971
}
7072

7173
func (s *TestServer) ProviderServer() tfprotov6.ProviderServer {
@@ -284,3 +286,12 @@ func (s *TestServer) ValidateListResourceConfig(_ context.Context, req *tfprotov
284286
s.ValidateListResourceConfigCalled[req.TypeName] = true
285287
return nil, nil
286288
}
289+
290+
func (s *TestServer) ListResource(_ context.Context, req *tfprotov6.ListResourceRequest) (*tfprotov6.ListResourceServerStream, error) {
291+
if s.ListResourceCalled == nil {
292+
s.ListResourceCalled = make(map[string]bool)
293+
}
294+
295+
s.ListResourceCalled[req.TypeName] = true
296+
return nil, nil
297+
}

internal/tfprotov5tov6/tfprotov5tov6.go

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,3 +1016,41 @@ func ValidateListResourceConfigResponse(in *tfprotov5.ValidateListResourceConfig
10161016
Diagnostics: Diagnostics(in.Diagnostics),
10171017
}
10181018
}
1019+
1020+
func ListResourceRequest(in *tfprotov5.ListResourceRequest) *tfprotov6.ListResourceRequest {
1021+
if in == nil {
1022+
return nil
1023+
}
1024+
1025+
return &tfprotov6.ListResourceRequest{
1026+
Config: DynamicValue(in.Config),
1027+
TypeName: in.TypeName,
1028+
}
1029+
}
1030+
1031+
func ListResourceServerStream(in *tfprotov5.ListResourceServerStream) *tfprotov6.ListResourceServerStream {
1032+
if in == nil {
1033+
return nil
1034+
}
1035+
1036+
return &tfprotov6.ListResourceServerStream{
1037+
Results: func(yield func(tfprotov6.ListResourceResult) bool) {
1038+
for res := range in.Results {
1039+
yield(*ListResourceResult(&res))
1040+
}
1041+
},
1042+
}
1043+
}
1044+
1045+
func ListResourceResult(in *tfprotov5.ListResourceResult) *tfprotov6.ListResourceResult {
1046+
if in == nil {
1047+
return nil
1048+
}
1049+
1050+
return &tfprotov6.ListResourceResult{
1051+
DisplayName: in.DisplayName,
1052+
Resource: DynamicValue(in.Resource),
1053+
Identity: ResourceIdentityData(in.Identity),
1054+
Diagnostics: Diagnostics(in.Diagnostics),
1055+
}
1056+
}

internal/tfprotov5tov6/tfprotov5tov6_test.go

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2990,6 +2990,121 @@ func TestValidateListResourceConfigResponse(t *testing.T) {
29902990
}
29912991
}
29922992

2993+
func TestListResourceRequest(t *testing.T) {
2994+
t.Parallel()
2995+
2996+
testCases := map[string]struct {
2997+
in *tfprotov5.ListResourceRequest
2998+
expected *tfprotov6.ListResourceRequest
2999+
}{
3000+
"nil": {
3001+
in: nil,
3002+
expected: nil,
3003+
},
3004+
"all-valid-fields": {
3005+
in: &tfprotov5.ListResourceRequest{
3006+
Config: &testTfprotov5DynamicValue,
3007+
TypeName: "test_list_resource",
3008+
},
3009+
expected: &tfprotov6.ListResourceRequest{
3010+
Config: &testTfprotov6DynamicValue,
3011+
TypeName: "test_list_resource",
3012+
},
3013+
},
3014+
}
3015+
3016+
for name, testCase := range testCases {
3017+
3018+
t.Run(name, func(t *testing.T) {
3019+
t.Parallel()
3020+
3021+
got := tfprotov5tov6.ListResourceRequest(testCase.in)
3022+
3023+
if diff := cmp.Diff(got, testCase.expected); diff != "" {
3024+
t.Errorf("unexpected difference: %s", diff)
3025+
}
3026+
})
3027+
}
3028+
}
3029+
3030+
/*func TestListResourceServerStream(t *testing.T) {
3031+
t.Parallel()
3032+
3033+
testCases := map[string]struct {
3034+
in *tfprotov5.ListResourceServerStream
3035+
expected *tfprotov6.ListResourceServerStream
3036+
}{
3037+
"nil": {
3038+
in: nil,
3039+
expected: nil,
3040+
},
3041+
"all-valid-fields": {
3042+
in: &tfprotov5.ListResourceServerStream{
3043+
Results: slices.Values([]tfprotov5.ListResourceResult{
3044+
{
3045+
Diagnostics: testTfprotov5Diagnostics,
3046+
},
3047+
}),
3048+
},
3049+
expected: &tfprotov6.ListResourceServerStream{
3050+
Results: slices.Values([]tfprotov6.ListResourceResult{
3051+
{
3052+
Diagnostics: testTfprotov6Diagnostics,
3053+
},
3054+
}),
3055+
},
3056+
},
3057+
}
3058+
3059+
for name, testCase := range testCases {
3060+
3061+
t.Run(name, func(t *testing.T) {
3062+
t.Parallel()
3063+
3064+
got := tfprotov5tov6.ListResourceServerStream(testCase.in)
3065+
3066+
if diff := cmp.Diff(got, testCase.expected); diff != "" {
3067+
t.Errorf("unexpected difference: %s", diff)
3068+
}
3069+
})
3070+
}
3071+
}*/
3072+
3073+
func TestListResourceResult(t *testing.T) {
3074+
t.Parallel()
3075+
3076+
testCases := map[string]struct {
3077+
in *tfprotov5.ListResourceResult
3078+
expected *tfprotov6.ListResourceResult
3079+
}{
3080+
"nil": {
3081+
in: nil,
3082+
expected: nil,
3083+
},
3084+
"all-valid-fields": {
3085+
in: &tfprotov5.ListResourceResult{
3086+
Diagnostics: testTfprotov5Diagnostics,
3087+
},
3088+
expected: &tfprotov6.ListResourceResult{
3089+
Diagnostics: testTfprotov6Diagnostics,
3090+
},
3091+
},
3092+
}
3093+
3094+
for name, testCase := range testCases {
3095+
3096+
t.Run(name, func(t *testing.T) {
3097+
t.Parallel()
3098+
3099+
got := tfprotov5tov6.ListResourceResult(testCase.in)
3100+
3101+
if diff := cmp.Diff(got, testCase.expected); diff != "" {
3102+
t.Errorf("unexpected difference: %s", diff)
3103+
}
3104+
})
3105+
}
3106+
}
3107+
29933108
func pointer[T any](value T) *T {
29943109
return &value
29953110
}

internal/tfprotov6tov5/tfprotov6tov5.go

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,3 +1083,41 @@ func ValidateListResourceConfigResponse(in *tfprotov6.ValidateListResourceConfig
10831083
Diagnostics: Diagnostics(in.Diagnostics),
10841084
}
10851085
}
1086+
1087+
func ListResourceRequest(in *tfprotov6.ListResourceRequest) *tfprotov5.ListResourceRequest {
1088+
if in == nil {
1089+
return nil
1090+
}
1091+
1092+
return &tfprotov5.ListResourceRequest{
1093+
Config: DynamicValue(in.Config),
1094+
TypeName: in.TypeName,
1095+
}
1096+
}
1097+
1098+
func ListResourceServerStream(in *tfprotov6.ListResourceServerStream) *tfprotov5.ListResourceServerStream {
1099+
if in == nil {
1100+
return nil
1101+
}
1102+
1103+
return &tfprotov5.ListResourceServerStream{
1104+
Results: func(yield func(tfprotov5.ListResourceResult) bool) {
1105+
for res := range in.Results {
1106+
yield(*ListResourceResult(&res))
1107+
}
1108+
},
1109+
}
1110+
}
1111+
1112+
func ListResourceResult(in *tfprotov6.ListResourceResult) *tfprotov5.ListResourceResult {
1113+
if in == nil {
1114+
return nil
1115+
}
1116+
1117+
return &tfprotov5.ListResourceResult{
1118+
DisplayName: in.DisplayName,
1119+
Resource: DynamicValue(in.Resource),
1120+
Identity: ResourceIdentityData(in.Identity),
1121+
Diagnostics: Diagnostics(in.Diagnostics),
1122+
}
1123+
}

0 commit comments

Comments
 (0)