Bicep error code - BCP302

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

Error description

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

Solutions

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

Examples

The following example raises the error because balla looks like a typo:

type ball = {
  name: string
  color: string
}

output tennisBall balla = {
  name: 'tennis'
  color: 'yellow'
}

You can fix the error by correcting the typo:

type ball = {
  name: string
  color: string
}

output tennisBall ball = {
  name: 'tennis'
  color: 'yellow'
}

Next steps

For more information about Bicep error and warning codes, see Bicep core diagnostics.