Bicep diagnostic code - BCP128

This diagnostic occurs when you specify an invalid module decorator.

Description

Function <function-name> can't be used as a module decorator.

Level

Error

Solutions

Use the valid decorators for module declarations. For more information, see Decorators.

Examples

The following example raises the diagnostic because @export() is not a valid module decorator.

@export()
module storage 'br/public:avm/res/storage/storage-account:0.11.1' = {
  name: 'myStorage'
  params: {
    name: 'store${resourceGroup().name}'
  }
}

The valid module decorators are @description() and @batchSize().

Next steps

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