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 assign a value to a property whose expected data type isn't compatible with the type of the assigned value.
The property <property-name> expected a value of type <data-type> but the provided value is of type <data-type>.
Warning / Error
Assign a value with the correct data type.
The following example raises the diagnostic because sku
is defined as a string, not an integer:
type storageAccountConfigType = {
name: string
sku: string
}
param foo storageAccountConfigType = {
name: 'myStorage'
sku: 2
}
You can fix the issue by assigning a string value to sku
:
type storageAccountConfigType = {
name: string
sku: string
}
param foo storageAccountConfigType = {
name: 'myStorage'
sku: 'Standard_LRS'
}
For more information about Bicep diagnostics, see Bicep core diagnostics.