helper/resource: don't assign to nil map

This commit is contained in:
Mitchell Hashimoto 2014-07-07 20:45:09 -07:00
parent bdc2a53c9d
commit f1d782031b
1 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,10 @@ func (m *Map) Apply(
result, err = r.Update(s, d, meta) result, err = r.Update(s, d, meta)
} }
if result != nil { if result != nil {
if result.Attributes == nil {
result.Attributes = make(map[string]string)
}
result.Attributes["id"] = result.ID result.Attributes["id"] = result.ID
} }