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 of a mismatched data type.
Expected a value of type <data-type> but the provided value is of type <data-type>.
Warning / Error
Use the expected data type. If the provided value is a token, enclose it in the any() function to mitigate the issue.
The following example raises the diagnostic because the expected data type is a string. The actual provided value is an integer:
var myValue = 5
output myString string = myValue
You can fix the diagnostic by providing a string value:
var myValue = '5'
output myString string = myValue
For more information about Bicep diagnostics, see Bicep core diagnostics.