Hello,
In my provider, I have the definition below:
"custom_field": {
Type: schema.TypeSet,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Required: true,
},
"type": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringInSlice([]string{"text", "integer", "boolean",
"date", "url", "selection", "multiple_selection"}, false),
},
"value": {
Type: schema.TypeString,
Required: true,
},
},
},
},
After doing an terraform apply, I can see in the tfstate:
"custom_field": [
{
"name": "cf_integer",
"type": "integer",
"value": "10"
},
{
"name": "cf_text",
"type": "text",
"value": "some text"
}
],
Is-it possible in the read function to not care about the field type ?
My concern is than the API is returning the name and value but not the type explicitly…
Thanks.