| title | BCP302 |
|---|---|
| description | The name <type-name> is not a valid type. |
| ms.topic | reference |
| ms.custom | devx-track-bicep |
| ms.date | 10/30/2025 |
This diagnostic occurs when you use an invalid data type or user-defined data type.
The name <type-name> is not a valid type. Please specify one of the following types: <type-names>.
Error
Use the correct data type or user-defined data type.
The following example raises the diagnostic because balla looks like a typo:
type ball = {
name: string
color: string
}
output tennisBall balla = {
name: 'tennis'
color: 'yellow'
}You can fix the diagnostic by correcting the typo:
type ball = {
name: string
color: string
}
output tennisBall ball = {
name: 'tennis'
color: 'yellow'
}For more information about Bicep diagnostics, see Bicep core diagnostics.