schema: Allow *Resource as Elem of TypeMap in validation (#12722)
This commit is contained in:
parent
ffc5a06cb5
commit
1df1c21d5b
|
@ -1357,6 +1357,13 @@ func getValueType(k string, schema *Schema) (ValueType, error) {
|
|||
return vt, nil
|
||||
}
|
||||
}
|
||||
|
||||
if _, ok := schema.Elem.(*Resource); ok {
|
||||
// TODO: We don't actually support this (yet)
|
||||
// but silently pass the validation, until we decide
|
||||
// how to handle nested structures in maps
|
||||
return TypeString, nil
|
||||
}
|
||||
return 0, fmt.Errorf("%s: unexpected map value type: %#v", k, schema.Elem)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue