Describe the bug
Building or deploying a bicep file that includes a Microsoft.Insights/scheduledQueryRules@2023-03-15-preview resource emits an inaccurate warning message:
Warning use-recent-api-versions: Use more recent API version for 'Microsoft.Insights/scheduledQueryRules'. '2023-03-15-preview' is a preview version and there is a more recent non-preview version available. Acceptable versions: 2023-12-01, 2022-06-15 [https://aka.ms/bicep/linter/use-recent-api-versions]
2023-12-01 is not a valid API version for Microsoft.Insights/scheduledQueryRules, and attempting to deploy with the suggested change results in an error.
To Reproduce
Create a bicep file (named e.g. main.bicep) with a Microsoft.Insights/scheduledQueryRules@2023-03-15-preview resource.
Bicep version 0.28.1
Describe the bug Building or deploying a bicep file that includes a
Microsoft.Insights/scheduledQueryRules@2023-03-15-preview
resource emits an inaccurate warning message:2023-12-01
is not a valid API version for Microsoft.Insights/scheduledQueryRules, and attempting to deploy with the suggested change results in an error.To Reproduce
Microsoft.Insights/scheduledQueryRules@2023-03-15-preview
resource.az bicep build --file main.bicep