You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
list: framework changes to support list with sdkv2 resources (#1198)
* framework changes support list in sdkv2
* update Set and SetAtPath to accept values of tftypes.Value
* move protov5 information into the resource metadataresponse
* add tests for updated Set and SetAtPath functionality
* remove redundant return statement
* further clean up
* add a schemas method for list
* return expected and received types in diags and add tests for failure states
* address review comments
* updated expected error message
* extend support for supplying raw schema types to proto6
* review comments
"An unexpected error was encountered trying to write the "+d.Description.String()+". This is always an error in the provider. Please report the following to the provider developer:\n\n"+
28
+
fmt.Sprintf("Error: Type mismatch between provided value and type of %s, expected %+v, got %+v", d.Description.String(), objType.String(), v.Type().String()),
"An unexpected error was encountered trying to write the "+d.Description.String()+". This is always an error in the provider. Please report the following to the provider developer:\n\n"+
49
+
fmt.Sprintf("Error: Type of provided value does not match type of %q, expected %s, got %s", path.String(), attrType.String(), v.Type().String()),
"An unexpected error was encountered trying to write an attribute to the "+d.Description.String()+". This is always an error in the provider. Please report the following to the provider developer:\n\n"+
diag.NewAttributeErrorDiagnostic(path.Root("test"), "Data Write Error", "An unexpected error was encountered trying to write the data. This is always an error in the provider. Please report the following to the provider developer:\n\n"+
2981
+
"Error: Type of provided value does not match type of \"test\", expected tftypes.String, got tftypes.Bool"),
diag.NewErrorDiagnostic("Data Write Error", "An unexpected error was encountered trying to write the data. This is always an error in the provider. Please report the following to the provider developer:\n\n"+
191
+
"Error: Type mismatch between provided value and type of data, expected tftypes.Object[\"name\":tftypes.String], got tftypes.Object[\"not_name\":tftypes.String]"),
"ListResource Type Defined without a Matching Managed Resource Type",
841
841
"The test_resource_1 ListResource type name was returned, but no matching managed Resource type was defined. "+
842
+
"If the matching managed Resource type is not a framework resource either ProtoV5Schema and ProtoV5IdentitySchema must be specified in the RawV5Schemas method, "+
843
+
"or ProtoV6Schema and ProtoV6IdentitySchema must be specified in the RawV6Schemas method. "+
842
844
"This is always an issue with the provider and should be reported to the provider developers.",
"ListResource Type Defined without a Matching Managed Resource Type",
92
-
fmt.Sprintf("The %s ListResource type name was returned, but no matching managed Resource type was defined. ", typeName)+
93
-
"This is always an issue with the provider and should be reported to the provider developers.",
94
-
)
95
-
continue
100
+
if (rawV5SchemasResp.ProtoV5Schema==nil||rawV5SchemasResp.ProtoV5IdentitySchema==nil) && (rawV6SchemasResp.ProtoV6Schema==nil||rawV6SchemasResp.ProtoV6IdentitySchema==nil) {
101
+
s.listResourceFuncsDiags.AddError(
102
+
"ListResource Type Defined without a Matching Managed Resource Type",
103
+
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 is not a framework resource either ProtoV5Schema and ProtoV5IdentitySchema must be specified in the RawV5Schemas method, "+
105
+
"or ProtoV6Schema and ProtoV6IdentitySchema must be specified in the RawV6Schemas method. "+
106
+
"This is always an issue with the provider and should be reported to the provider developers.",
0 commit comments