type CvmModel struct {
...
ResourceIds []types.String `tfsdk:"resource_ids"`
ResourceIps []types.String `tfsdk:"resource_ips"`
}
func (c *CvmResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
resp.Schema = schema.Schema{
MarkdownDescription: "`odin tree node resource` used to mount node on odin tree",
Attributes: map[string]schema.Attribute{
...
"resource_ids": schema.ListAttribute{
Computed: true,
MarkdownDescription: "resource_ids",
Description: "resource_ids",
ElementType: types.StringType,
},
"resource_ips": schema.ListAttribute{
Computed: true,
MarkdownDescription: "resource_ips",
Description: "resource_ips",
ElementType: types.StringType,
},
},
}
}
Err is
│ An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report the following to the provider developer:
│
│ Received unknown value, however the target type cannot handle unknown values. Use the corresponding `types` package type or a custom type that handles unknown values.
│
│ Path: resource_ids
│ Target Type: []basetypes.StringValue
│ Suggested Type: basetypes.ListValue