Bicep diagnostic code - BCP070
This diagnostic occurs when a function is given an argument with the wrong data type.
Argument of type <argument-type> isn't assignable to parameter of type <parameter-type>.
Error
Provide a parameter with the correct data type.
The following example raises the diagnostic because the contains()
function, when used with a string as its first argument, requires a string as its second argument, but an integer was provided instead:
Bicep
output stringTrue bool = contains('OneTwoThree', 2)
You can fix the diagnostic by using a string as its second argument:
Bicep
output stringTrue bool = contains('OneTwoThree', 'Two')
For more information about Bicep diagnostics, see Bicep core diagnostics.