Bicep error code - BCP125

This error occurs when you specify an invalid parameter decorator.

Error description

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

Solutions

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

Examples

The following example raises the error because @export() isn't a valid decorator for parameters.

@export()
param name string 

You can fix the error by providing the correct decorator for parameters:

@description('Specify the resource name.')
param name string 

Next steps

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