Skip to content

Commit f14e5b3

Browse files
authored
Fix Handler returning SUCCESS but not returning the primaryIdentifier for the physical resource
1 parent 82d22a0 commit f14e5b3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cfn/cfn.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,12 @@ func makeEventFunc(h Handler) eventFunc {
320320
}
321321

322322
if isMutatingAction(event.Action) {
323-
callbackAdapter.ReportStatus(translateStatus(progEvt.OperationStatus), event.RequestData.ResourceProperties, progEvt.Message, string(r.ErrorCode))
323+
m, err := encoding.Marshal(progEvt.ResourceModel)
324+
if err != nil {
325+
log.Printf("Error reporting status: %v", err)
326+
return re.report(event, "Error", err, unmarshalingError)
327+
}
328+
callbackAdapter.ReportStatus(translateStatus(progEvt.OperationStatus), m, progEvt.Message, string(r.ErrorCode))
324329
}
325330

326331
switch r.OperationStatus {

0 commit comments

Comments
 (0)