Resource type Microsoft.Monitor/accounts/metricsContainers requires location but it is not in schema
- Dominant language
- TypeScript
- Stars
- 108
- Forks
- 44
- Avg merge
- 18h 53m
- Merged PRs (30d)
- 29
Description
**Bicep version**
Bicep CLI version 0.37.4 (27cc8db2ed)
**Describe the bug**
Resource type Microsoft.Monitor/accounts/metricsContainers@2025-05-03-preview requires location but it is not in schema. If deployed without location error is generated: Message: Invalid metrics container payload: 'location' is missing. (Code: InvalidResource)
**To Reproduce**
Steps to reproduce the behavior:
```bicep
resource metricsContainer 'Microsoft.Monitor/accounts/metricsContainers@2025-05-03-preview' = {
name: 'default'
parent: monitorWorkspaceRes
properties: {
limits: {
maxActiveTimeSeries: 1000000
maxEventsPerMinute: 1000000
}
}
}
```
to fix:
```bicep
resource metricsContainer 'Microsoft.Monitor/accounts/metricsContainers@2025-05-03-preview' = {
name: 'default'
parent: monitorWorkspaceRes
location: resourceGroup().location
properties: {
limits: {
maxActiveTimeSeries: 1000000
maxEventsPerMinute: 1000000
}
}
}
```
**Additional context**
Add any other context about the problem here.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the schema definition for Microsoft.Monitor/accounts/metricsContainers@2025-05-03-preview in the Bicep type definitions and compare it with the deployment example. Verify the behavior with Bicep CLI 0.37.4 using the reproduction, then confirm that the schema requires location and the resource deploys without the InvalidResource error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100