diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/helper/schema/field_reader.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/helper/schema/field_reader.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/vendor/github.com/hashicorp/terraform/helper/schema/field_reader.go b/vendor/github.com/hashicorp/terraform/helper/schema/field_reader.go index 1660a67..b80b223 100644 --- a/vendor/github.com/hashicorp/terraform/helper/schema/field_reader.go +++ b/vendor/github.com/hashicorp/terraform/helper/schema/field_reader.go | |||
@@ -126,6 +126,8 @@ func addrToSchema(addr []string, schemaMap map[string]*Schema) []*Schema { | |||
126 | switch v := current.Elem.(type) { | 126 | switch v := current.Elem.(type) { |
127 | case ValueType: | 127 | case ValueType: |
128 | current = &Schema{Type: v} | 128 | current = &Schema{Type: v} |
129 | case *Schema: | ||
130 | current, _ = current.Elem.(*Schema) | ||
129 | default: | 131 | default: |
130 | // maps default to string values. This is all we can have | 132 | // maps default to string values. This is all we can have |
131 | // if this is nested in another list or map. | 133 | // if this is nested in another list or map. |
@@ -249,11 +251,10 @@ func readObjectField( | |||
249 | } | 251 | } |
250 | 252 | ||
251 | // convert map values to the proper primitive type based on schema.Elem | 253 | // convert map values to the proper primitive type based on schema.Elem |
252 | func mapValuesToPrimitive(m map[string]interface{}, schema *Schema) error { | 254 | func mapValuesToPrimitive(k string, m map[string]interface{}, schema *Schema) error { |
253 | 255 | elemType, err := getValueType(k, schema) | |
254 | elemType := TypeString | 256 | if err != nil { |
255 | if et, ok := schema.Elem.(ValueType); ok { | 257 | return err |
256 | elemType = et | ||
257 | } | 258 | } |
258 | 259 | ||
259 | switch elemType { | 260 | switch elemType { |