I have a computed value srm_nodes
defined in the resource schema.
“srm_node_ids”: {
Type: schema.TypeList,
Computed: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
“id”: {
Type: schema.TypeString,
Computed: true,
},
“type”: {
Type: schema.TypeString,
Computed: true,
},
“host_name”: {
Type: schema.TypeString,
Computed: true,
},
},
},
The list and its values are all computed. How can I set these computed values in the resourceRead
method? I usually set the value of a string computed type using d.Set("item_name",item.Name)
. What is the correct way to do the same for each computed value of a TypeList ?