Bicep error code - BCP153

This error occurs when you have a decorator that is expecting to be followed by a resource or module declaration, but miss the declaration.

Error description

Expected a resource or module declaration after the decorator.

Solutions

Add the module or resource declarations.

Examples

The following example raises the error because the type declaration is missing.

@batchSize()

You can fix the error by adding the module or resource declaration.

@batchSize(3)
module storage 'br/public:avm/res/storage/storage-account:0.11.1' = [for storageName in storageAccounts: {
  name: 'myStorage'
  params: {
    name: 'store${resourceGroup().name}'
  }
}]

For a list of valid decorators, see Module decorators and Resource decorators.

Next steps

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