Rediger

Del via


Bicep diagnostic code - BCP302

This diagnostic occurs when you use an invalid data type or user-defined data type.

Description

The name <type-name> is not a valid type. Please specify one of the following types: <type-names>.

Level

Error

Solutions

Use the correct data type or user-defined data type.

Examples

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'
}

Next steps

For more information about Bicep diagnostics, see Bicep core diagnostics.