From f14e5b363904a90784e0475ecb5bb230790fea04 Mon Sep 17 00:00:00 2001 From: Brian Terry Date: Mon, 20 Apr 2020 14:38:23 -0400 Subject: [PATCH] Fix Handler returning SUCCESS but not returning the primaryIdentifier for the physical resource --- cfn/cfn.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cfn/cfn.go b/cfn/cfn.go index 9953ca35..251504a3 100644 --- a/cfn/cfn.go +++ b/cfn/cfn.go @@ -320,7 +320,12 @@ func makeEventFunc(h Handler) eventFunc { } if isMutatingAction(event.Action) { - callbackAdapter.ReportStatus(translateStatus(progEvt.OperationStatus), event.RequestData.ResourceProperties, progEvt.Message, string(r.ErrorCode)) + m, err := encoding.Marshal(progEvt.ResourceModel) + if err != nil { + log.Printf("Error reporting status: %v", err) + return re.report(event, "Error", err, unmarshalingError) + } + callbackAdapter.ReportStatus(translateStatus(progEvt.OperationStatus), m, progEvt.Message, string(r.ErrorCode)) } switch r.OperationStatus {