helper/schema: return the prior state if Data is an error
This commit is contained in:
parent
cefc07d665
commit
40e5608fa9
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue