I am trying to deploy application insights alerts (non-classic) that use a search query as the signal logic criteria. I am using a resource manager template for this so that I can automate deployment.
When there is no data in the associated application insights resource then the alert deployment fails with the error:
properties.search.query is not a valid log or metric query properties.search.query is not a valid log search query
Once the application insights contains some data then the alert deployment succeeds without error.
This is a problem as I need to be able to deploy the alerts before my application is running and logging data.