We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95b6a9f commit 135bfe7Copy full SHA for 135bfe7
1 file changed
cfn/wrap.go
@@ -6,6 +6,7 @@ import (
6
"context"
7
"encoding/json"
8
"errors"
9
+ "fmt"
10
"log"
11
"net/http"
12
@@ -58,6 +59,10 @@ func lambdaWrapWithClient(lambdaFunction CustomResourceFunction, client httpClie
58
59
r.Status = StatusFailed
60
r.Reason = err.Error()
61
log.Printf("sending status failed: %s", r.Reason)
62
+ } else if event.RequestType == RequestDelete && event.PhysicalResourceID != r.PhysicalResourceID {
63
+ r.Status = StatusFailed
64
+ r.Reason = fmt.Sprintf("DELETE: cannot change the physical resource ID from %s to %s during deletion", event.PhysicalResourceID, r.PhysicalResourceID)
65
+ log.Printf("sending status failed: %s", r.Reason)
66
} else {
67
r.Status = StatusSuccess
68
}
0 commit comments