Azure / Azure/bicep

BCP081: Resource type "Microsoft.Insights/scheduledQueryRules@2021-08-01" does not have types available.

Open
#6,789 3 comments 0 reactions 0 assignees View on GitHub
provider bug types: swagger inaccuracy
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 4h
Merged PRs (30d)
81

Description

**Bicep version**
Bicep CLI version 0.4.1272 (a69022dd2c)

**Describe the bug**
BCP081: Resource type "Microsoft.Insights/scheduledQueryRules@2021-08-01" does not have types available.
The available API versions for the resource provider: 'Microsoft.SecurityInsights/alertRules' listed using the following Az CLI command:
az provider list -o json provides a incorrect array of API versions compared to the ones listed using the Bicep Extension and intellisense in VScode

**To Reproduce**

API's for 'Microsoft.SecurityInsights/alertRules' using: "az provider list -o json"
'2022-05-01-preview
2022-04-01-preview
2022-01-01-preview
2021-10-01-preview
2021-10-01
2021-09-01-preview
2021-03-01-preview
2020-01-01
2019-01-01-preview'

API's for 'Microsoft.SecurityInsights/alertRules' using Bicep:
2021-09-01-preview'
2021-03-01-preview
2020-01-01'
2019-01-01-preview'

![image](https://user-images.githubusercontent.com/44023368/167406398-0b649839-8561-4c3e-a0a6-9a4732862560.png)

**Additional context**
When building bicep using one of the 'available' versions taken directly from: "az provider list -o json"
the build just fails with the following warning:

BCP081: Resource type "Microsoft.Insights/scheduledQueryRules@2021-08-01" does not have types available.

Contributor guide

Open the contributing guide

Research direction

Start by comparing the API versions returned by `az provider list -o json` with those shown by the Bicep extension and VS Code IntelliSense for `Microsoft.Insights/scheduledQueryRules` and `Microsoft.SecurityInsights/alertRules`. Trace why the listed `2021-08-01` version has no types available; done means the reported supported versions agree and the BCP081 warning no longer occurs for a valid version.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, vscode
Domain
cloud, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.