| title | BCP033 |
|---|---|
| description | Expected a value of type <data-type> but the provided value is of type <data-type>. |
| ms.topic | reference |
| ms.custom | devx-track-bicep |
| ms.date | 10/30/2025 |
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 = myValueYou can fix the diagnostic by providing a string value:
var myValue = '5'
output myString string = myValueFor more information about Bicep diagnostics, see Bicep core diagnostics.