Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.22 KB

File metadata and controls

49 lines (33 loc) · 1.22 KB
title BCP153
description Expected a resource or module declaration after the decorator.
ms.topic reference
ms.custom devx-track-bicep
ms.date 10/30/2025

Bicep diagnostic code - BCP153

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

Description

Expected a resource or module declaration after the decorator.

Level

Error

Solutions

Add the module or resource declarations.

Examples

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

@batchSize()

You can fix the diagnostic 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 diagnostics, see Bicep core diagnostics.