bicep
bicep copied to clipboard
ResourceDefinedTypes - Emit warning for type mismatches
Is your feature request related to a problem? Please describe. When using resource defined types, assigning a mismatched type to a property does not emit a warning. For example:
param container resource<'Microsoft.DocumentDB/databaseAccounts/sqlDatabases/containers@2024-05-15'>.properties.resource.indexingPolicy
resource sa 'Microsoft.Storage/storageAccounts@2023-05-01' = {
location: resourceGroup().location
sku: { name: 'Standard_GRS' }
kind: 'StorageV2'
name: 'my-sa'
properties: {
accessTier: 'Hot'
azureFilesIdentityBasedAuthentication: container // does not emit warning
}
}
Describe the solution you'd like
In the example above, it would be nice if the compiler emitted a warning indicating that the container
param type did not match expected AzureFilesIdentityBasedAuthentication
.