From 3edea4dd0a2d3613414a8cd37eb475bb6bec998b Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Wed, 15 Mar 2017 12:12:17 +0000 Subject: [PATCH] schema: Allow *Resource as Elem of TypeMap in validation --- helper/schema/schema.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/helper/schema/schema.go b/helper/schema/schema.go index c18e99963af3..ac55d7624849 100644 --- a/helper/schema/schema.go +++ b/helper/schema/schema.go @@ -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) }