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
1 changed files with 1 additions and 1 deletions

View File

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