Bicep error/warning code - BCP089

This error/warning occurs when a property name seems to be a typo.

Error/warning description

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

Solution

Fix the typo.

Examples

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

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

You can fix the error by correcting the typo:

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

The following example raises the error 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 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 warnings and errors.