I’m using terraform-plugin-sdk to write a provider and it has a TypeSet which contains computed attributes (which also contain computed nested attributes).
"metric_fields": {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"aggregations": {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
....
},
},
},
},
After applying, the plan phase always returns not empty.
when I change it from TypeSet to TypeList It doesn’t seem to be reproduced.
What is the best practice to handle this issue?