[英]Azure Function EventGrid Trigger does not support Key Vault references?
這是我解決這個問題的方法:
Code+Test
, Test/Run
然后Run
AzureWebJobsStorage
值不正確。local.settings.json
使用了 Key Vault引用,而不是直接使用連接字符串(以防止我的代碼泄露秘密)local.settings.json
,從 Key Vault Reference 更改為實際的連接字符串。觸發器顯示正確
恢復到local.settings.json
Key Vault Reference並重新發布以測試是否返回錯誤。
果然:
2020-10-05T23:37:11.138 [Information] Initializing Warmup Extension./home/LogFiles/Application/Functions/Host/2020-10-05T21-04-07Z-59062a025e.log (https://function-dev.scm.azurewebsites.net/api/vfs/LogFiles/Application/Functions/Host/2020-10-05T21-04-07Z-59062a025e.log)
2020-10-05T21:04:07.832 [Information] Host started (642ms)
2020-10-05T21:04:07.833 [Information] Job host started
2020-10-05T21:04:07.835 [Error] The 'function-dev' function is in error: Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.function-dev'. Microsoft.Azure.WebJobs.Extensions.Storage: Storage account connection string for 'AzureWebJobsStorage' is invalid.
看起來像使用 Key Vault引用作為 AppSettings 不支持 EventGrid 觸發器(?)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.