Terraform Plugin Framework : Value Conversion Error unhandled unknown value

I am using terraform-plugin-framework 0.10.0. I need to store computed attribute in the state file.

I have defined the attribute in the model as []string. In the schema, the attribute is defined as

“attribute”: {
Type: types.ListType{
ElemType: types.StringType,
},
Computed: true,
},

While saving the state, its throwing below error:

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:
**│ **
│ unhandled unknown value

I’m not sure if that’s the correct way to do it, but for me setting the model attribute like this works:

diags.Append(tfsdk.ValueFrom(ctx, values, types.ListType{ElemType: types.StringType}, &model.Attribute)...)

Hi folks :wave: When working with Go structs to convert schema-based data to regular Go types, you have to be careful when working with configuration or plan data. Unlike state data, which is either null or a known value (and typically can use “regular” Go types like []string, *string, etc), configuration or plan data can contain unknown values: Plugin Development - Framework: Access State, Config, and Plan | Terraform by HashiCorp

The recommended way to deal with configuration or plan data for now is using types package types in Go structs, e.g.

type myModel struct {
  ExampleList types.List `tfsdk:"example_list"`
}

Hope this insight helps a little.

Thanks @bflad, that solve my issues