Bicep diagnostic code - BCP089

This diagnostic occurs when a property name seems to be a typo.

Description

The property <property-name> is not allowed on objects of type <resource-type/type-definition>. Did you mean <property-name>?

Level

Warning / Error

Solution

Fix the typo.

Examples

The following example raises the diagnostic because the property name named looks like a typo.

resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
  named: 'account'
}

You can fix the diagnostic by correcting the typo:

resource storageAccount 'Microsoft.Storage/storageAccounts@2023-05-01' existing = {
  name: 'account'
}

The following example raises the diagnostic because the property name color1 looks like a typo.

type ball = {
  name: string
  color: string
}

output tennisBall ball = {
  name: 'tennis'
  color1: '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.