Location not supported with resource type Microsoft.Compute/virtualMachineScaleSets/extensions
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 79
Description
**Bicep version**
0.13.1
**Describe the bug**
For resource type `Microsoft.Compute/virtualMachineScaleSets/extensions` with API version `2022-03-01`, getting below warning
The resource is deployed successfully but warning is causing pull request error.
```
Warning BCP187: The property "location" does not exist in the resource definition, although it might still be valid. If this is an inaccuracy in the documentation, please report it to the Bicep Team. [https://aka.ms/bicep-type-issues]
```
**To Reproduce**
Getting warning with below resource block
```bicep
resource vmssExtension 'Microsoft.Compute/virtualMachineScaleSets/extensions@2022-03-01' = if (vTPM && secureBoot) {
parent: vmss
name: extensionName
location: location
properties: {
publisher: extensionPublisher
type: extensionName
typeHandlerVersion: extensionVersion
autoUpgradeMinorVersion: true
settings: {
AttestationConfig: {
MaaSettings: {
maaEndpoint: maaEndpoint
maaTenantName: maaTenantName
}
AscSettings: {
ascReportingEndpoint: substring(maaEndpoint, 0, 0)
ascReportingFrequency: substring(maaEndpoint, 0, 0)
}
useCustomToken: useAlternateToken
disableAlerts: disableAlerts
}
}
}
}
```
**Additional context**
The warning is generating pull request error for azure quickstart templates.
Contributor guide
Research direction
Start by reproducing the BCP187 warning for Microsoft.Compute/virtualMachineScaleSets/extensions@2022-03-01 using the resource block in the issue, then trace how Bicep describes that resource type. The work is done when the valid location property no longer produces the warning and the affected Azure Quickstart template passes validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100