Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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-defintion>.
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.