Skip to content

Commit aea7a09

Browse files
committed
review comments
1 parent a39dc07 commit aea7a09

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

internal/fwserver/server_getmetadata_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ func TestServerGetMetadata(t *testing.T) {
839839
diag.NewErrorDiagnostic(
840840
"ListResource Type Defined without a Matching Managed Resource Type",
841841
"The test_resource_1 ListResource type name was returned, but no matching managed Resource type was defined. "+
842-
"If the matching managed Resource type not a framework resource either ProtoV5Schema and ProtoV5IdentitySchema must be specified in the RawV5Schemas method, "+
842+
"If the matching managed Resource type is not a framework resource either ProtoV5Schema and ProtoV5IdentitySchema must be specified in the RawV5Schemas method, "+
843843
"or ProtoV6Schema and ProtoV6IdentitySchema must be specified in the RawV6Schemas method. "+
844844
"This is always an issue with the provider and should be reported to the provider developers.",
845845
),

internal/fwserver/server_listresources.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (s *Server) ListResourceFuncs(ctx context.Context) (map[string]func() list.
101101
s.listResourceFuncsDiags.AddError(
102102
"ListResource Type Defined without a Matching Managed Resource Type",
103103
fmt.Sprintf("The %s ListResource type name was returned, but no matching managed Resource type was defined. ", typeName)+
104-
"If the matching managed Resource type not a framework resource either ProtoV5Schema and ProtoV5IdentitySchema must be specified in the RawV5Schemas method, "+
104+
"If the matching managed Resource type is not a framework resource either ProtoV5Schema and ProtoV5IdentitySchema must be specified in the RawV5Schemas method, "+
105105
"or ProtoV6Schema and ProtoV6IdentitySchema must be specified in the RawV6Schemas method. "+
106106
"This is always an issue with the provider and should be reported to the provider developers.",
107107
)

list/list_resource.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ type ListResource interface {
4545

4646
// ListResourceWithRawV5Schemas is an interface type that extends ListResource to include a method
4747
// which allows provider developers to supply the ProtoV5 representations of resource and resource identity
48-
// schemas. This is necessary if list functionality is being used with a legacy resource.
48+
// schemas. This is necessary if list functionality is being used with a resource that is not defined with Framework.
4949
type ListResourceWithRawV5Schemas interface {
5050
ListResource
5151

@@ -54,12 +54,12 @@ type ListResourceWithRawV5Schemas interface {
5454
}
5555

5656
// ListResourceWithRawV6Schemas is an interface type that extends ListResource to include a method
57-
// which allows provider developers to supply the ProtoV5 representations of resource and resource identity
58-
// schemas. This is necessary if list functionality is being used with a legacy resource.
57+
// which allows provider developers to supply the ProtoV6 representations of resource and resource identity
58+
// schemas. This is necessary if list functionality is being used with a resource that is not defined with Framework.
5959
type ListResourceWithRawV6Schemas interface {
6060
ListResource
6161

62-
// RawV6Schemas is called to provide the ProtoV5 representations of the resource and resource identity schemas.
62+
// RawV6Schemas is called to provide the ProtoV6 representations of the resource and resource identity schemas.
6363
RawV6Schemas(context.Context, RawV6SchemaRequest, *RawV6SchemaResponse)
6464
}
6565

@@ -209,7 +209,7 @@ type ListResult struct {
209209
// to the ListResource type RawV5Schemas method.
210210
type RawV5SchemaRequest struct{}
211211

212-
// RawV5SchemaResponse represents a response that is populated by the Schemas method
212+
// RawV5SchemaResponse represents a response that is populated by the RawV5Schemas method
213213
// and is used to pass along the ProtoV5 representations of the resource and resource identity schemas.
214214
type RawV5SchemaResponse struct {
215215
// ProtoV5IdentitySchema is the ProtoV5 representation of the resource identity
@@ -224,19 +224,19 @@ type RawV5SchemaResponse struct {
224224
}
225225

226226
// RawV6SchemaRequest represents a request for the ListResource to return the
227-
// ProtoV5 schemas. An instance of this request struct is supplied as an argument
228-
// to the ListResource type RawV5Schemas method.
227+
// ProtoV6 schemas. An instance of this request struct is supplied as an argument
228+
// to the ListResource type RawV6Schemas method.
229229
type RawV6SchemaRequest struct{}
230230

231-
// RawV6SchemaResponse represents a response that is populated by the Schemas method
232-
// and is used to pass along the ProtoV5 representations of the resource and resource identity schemas.
231+
// RawV6SchemaResponse represents a response that is populated by the RawV6Schemas method
232+
// and is used to pass along the ProtoV6 representations of the resource and resource identity schemas.
233233
type RawV6SchemaResponse struct {
234-
// ProtoV5IdentitySchema is the ProtoV5 representation of the resource identity
234+
// ProtoV6IdentitySchema is the ProtoV6 representation of the resource identity
235235
// schema. This should only be supplied if framework functionality is being used
236236
// with a legacy resource. Currently, this only applies to list.
237237
ProtoV6IdentitySchema *tfprotov6.ResourceIdentitySchema
238238

239-
// ProtoV5Schema is the ProtoV5 representation of the resource schema
239+
// ProtoV6Schema is the ProtoV6 representation of the resource schema
240240
// This should only be supplied if framework functionality is being used
241241
// with a legacy resource. Currently, this only applies to list.
242242
ProtoV6Schema *tfprotov6.Schema

0 commit comments

Comments
 (0)