Bicep diagnostic code - BCP053

This diagnostic occurs when you reference a property that isn't defined in the resource type or user-defined data type.

Description

The type <type-name> does not contain property <property-name>. Available properties include <property-names>.

Level

Warning / Error

Solution

Reference the correct property name.

Examples

The following example raises the diagnostic because Microsoft.Storage/storageAccounts doesn't contain a property called bar.

param location string 

resource storage 'Microsoft.Storage/storageAccounts@2023-04-01' = {
  name: 'myStorage'
  location: location
  sku: {
    name: 'Standard_LRS'
  }
  kind: 'StorageV2'
}

output foo string = storage.bar 

You can fix the diagnostic by referencing a valid property, such as name:

param location string 

resource storage 'Microsoft.Storage/storageAccounts@2023-04-01' = {
  name: 'myStorage'
  location: location
  sku: {
    name: 'Standard_LRS'
  }
  kind: 'StorageV2'
}

output foo string = storage.name

Next steps

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