helper/schema: return the prior state if Data is an error

This commit is contained in:
Mitchell Hashimoto 2014-08-26 15:50:31 -07:00
parent cefc07d665
commit 40e5608fa9

View File

@ -103,7 +103,7 @@ func (r *Resource) Refresh(
meta interface{}) (*terraform.ResourceState, error) {
data, err := schemaMap(r.Schema).Data(s, nil)
if err != nil {
return nil, err
return s, err
}
err = r.Read(data, meta)