| title | BCP037 |
|---|---|
| description | The property <property-name> is not allowed on objects of type <type-definition>. |
| ms.topic | reference |
| ms.custom | devx-track-bicep |
| ms.date | 10/30/2025 |
This diagnostic occurs when you specify a property that isn't defined in a resource type.
The property <property-name> is not allowed on objects of type <type-definition>.
Warning / Error
Remove the undefined property.
The following example raises the diagnostic because bar isn't defined in storageAccountType:
type storageAccountConfigType = {
name: string
sku: string
}
param foo storageAccountConfigType = {
name: 'myStorage'
sku: 'Standard_LRS'
bar: 'myBar'
}You can fix the issue by removing the property:
type storageAccountConfigType = {
name: string
sku: string
}
param foo storageAccountConfigType = {
name: 'myStorage'
sku: 'Standard_LRS'
}The following example raises the diagnostic because obj is a sealed type and doesn't define a baz property.
@sealed()
type obj = {
foo: string
bar: string
}
param p obj = {
foo: 'foo'
bar: 'bar'
baz: 'baz'
}You can fix the issue by removing the property:
@sealed()
type obj = {
foo: string
bar: string
}
param p obj = {
foo: 'foo'
bar: 'bar'
}For more information about Bicep diagnostics, see Bicep core diagnostics.