diff --git a/helper/schema/resource_data.go b/helper/schema/resource_data.go index d1057f813f..52582e542e 100644 --- a/helper/schema/resource_data.go +++ b/helper/schema/resource_data.go @@ -16,6 +16,10 @@ type ResourceData struct { } // Get returns the data for the given key, or nil if the key doesn't exist. +// +// The type of the data returned will be according to the schema specified. +// Primitives will be their respective types in Go, lists will always be +// []interface{}, and sub-resources will be map[string]interface{}. func (d *ResourceData) Get(key string) interface{} { parts := strings.Split(key, ".") return d.getObject("", parts, d.schema)