Azure / bicep-types-az

Bicep type definitions for ARM resources
MIT License
80 stars 26 forks source link

Linter rule use-recent-api-versions suggests non-existent version for resource type #2193

Open chvrl opened 1 month ago

chvrl commented 1 month ago

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:

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

  1. Create a bicep file (named e.g. main.bicep) with a Microsoft.Insights/scheduledQueryRules@2023-03-15-preview resource.
  2. Run az bicep build --file main.bicep
stephaniezyen commented 1 month ago

Unfortunately this is an RP issue, please open up a support ticket with the Microsoft.Insights team.