From 8003b3408f8e94984b3558acebe774e4d755f452 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Fri, 7 Sep 2018 08:50:29 -0700 Subject: [PATCH] states: Fix incorrect ResourceInstanceObjectSrc.DeepCopy Accidental shadowing of the top-level attrsFlat variable meant that the flatmap portion of these objects was getting lost in the DeepCopy result. --- states/state_deepcopy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/states/state_deepcopy.go b/states/state_deepcopy.go index d07bc16c2..5569ffb0a 100644 --- a/states/state_deepcopy.go +++ b/states/state_deepcopy.go @@ -133,7 +133,7 @@ func (obj *ResourceInstanceObjectSrc) DeepCopy() *ResourceInstanceObjectSrc { var attrsFlat map[string]string if obj.AttrsFlat != nil { - attrsFlat := make(map[string]string, len(obj.AttrsFlat)) + attrsFlat = make(map[string]string, len(obj.AttrsFlat)) for k, v := range obj.AttrsFlat { attrsFlat[k] = v }