"Resource should pre-exist" 向 EventGrid 订阅添加高级过滤器时出错

"Resource should pre-exist" error when adding Advanced Filters to EventGrid Subscription

为什么会发生这种情况,我该如何解决?

问题:

Deploying Event Subscription: my-eventgrid-sub-name
Deployment has failed with the following error: 
{
    code:"Endpoint validation",
    message:"Destination azure endpoint not found,
    Resource details: resourceId:/subscriptions/<redacted>/resourceGroups/<redacted>/providers/Microsoft.Web/sites/myFunctionAppName/functions/myFunctionName. 
    Resource should pre-exist before attempting this operation,
    Activity id:7e9c4817-5bbd-4772-a7b0-a4dbc70dbf04, 
    timestamp: 10/24/2020 7:01:39 PM (UTC)."
}

当然myFucnctionName存在。它已经存在并运行了数周。似乎 EventGrid 无法“看到”函数。

编辑 1:

如错误消息 - Resource should pre-exist before attempting this operation 所述,此错误有两个可能的原因:

  • 您尚未创建您在此订阅中指向的事件网格触发器功能应用。
  • 函数应用程序的工件未正确部署且函数应用程序不存在。