From f1d782031ba1df3be15cd4e4fb286624d1c30e7d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 7 Jul 2014 20:45:09 -0700 Subject: [PATCH] helper/resource: don't assign to nil map --- helper/resource/map.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helper/resource/map.go b/helper/resource/map.go index e1600ce82..0daa3483e 100644 --- a/helper/resource/map.go +++ b/helper/resource/map.go @@ -50,6 +50,10 @@ func (m *Map) Apply( result, err = r.Update(s, d, meta) } if result != nil { + if result.Attributes == nil { + result.Attributes = make(map[string]string) + } + result.Attributes["id"] = result.ID }