Bicep diagnostic code - BCP152
This diagnostic occurs when you try to use a Bicep function as a decorator, but the function isn't suitable for that purpose.
Description
Function <function-name> can't be used as a decorator.
Level
Error
Solutions
Use valid decorators. For a list of parameter decorators, see Decorators.
Examples
The following example raises the diagnostic because uniqueString()
can't be used as a parameter decorator.
@uniqueString()
param name string
You can fix the diagnostic by using the valid decorators.
@description('Provide resource name.')
param name string
Next steps
For more information about Bicep diagnostics, see Bicep core diagnostics.