From ffddf96603cadfca7c54deb56fc3defa0dc90d65 Mon Sep 17 00:00:00 2001 From: "joel.ringuette" Date: Thu, 22 Jun 2017 16:24:24 -0500 Subject: [PATCH] Fix issue with reading timeouts on Delete Original fix by @jringuette but I couldn't get his patch to apply after the repo split :/ --- helper/schema/resource.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helper/schema/resource.go b/helper/schema/resource.go index c8105588c..03f62cb10 100644 --- a/helper/schema/resource.go +++ b/helper/schema/resource.go @@ -142,6 +142,12 @@ func (r *Resource) Apply( if err := rt.DiffDecode(d); err != nil { log.Printf("[ERR] Error decoding ResourceTimeout: %s", err) } + } else if s != nil { + if _, ok := s.Meta[TimeoutKey]; ok { + if err := rt.StateDecode(s); err != nil { + log.Printf("[ERR] Error decoding ResourceTimeout: %s", err) + } + } } else { log.Printf("[DEBUG] No meta timeoutkey found in Apply()") }