Bicep error code - BCP128
This error occurs when you specify an invalid module decorator.
Error description
Function <function-name> can't be used as a module decorator.
Solutions
Use the valid decorators for module declarations. For more information, see Decorators.
Examples
The following example raises the error 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 error and warning codes, see Bicep core diagnostics.