Provide more helpful error when property exists in newer API template
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Is your feature request related to a problem? Please describe.**
Consider the following template:
```bicep
resource keyvault 'Microsoft.KeyVault/vaults@2018-02-14' = {
properties: {
enableRbacAuthorization: true
}
}
```
This will produce the following warning:
> The property "enableRbacAuthorization" is not allowed on objects of type "VaultProperties". Permissible properties include "accessPolicies", "createMode", "enabledForDeployment", "enabledForDiskEncryption", "enabledForTemplateDeployment", "enablePurgeProtection", "enableSoftDelete", "networkAcls", "sku", "tenantId", "vaultUri".
**Describe the solution you'd like**
Whilst the above error isn't wrong (`enableRbacAuthorization` doesnt' exist in api version `2018-02-14`), the property does exist in newer API versions (e.g. `2019-09-01`).
Could bicep provide a more helpful error stating that the property is available in newer API versions. (And even better if it could be combined with a quick fix in VS Code)
Contributor guide
Research direction
Start by reproducing the warning with the provided Bicep template using Microsoft.KeyVault/vaults@2018-02-14, then compare it with the 2019-09-01 API version where enableRbacAuthorization exists. Done means the diagnostic identifies that the property is available in a newer API version; the optional VS Code quick fix is also described as a possible extension.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud, compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100