Bicep diagnostic code - BCP126
This diagnostic occurs when you specify an invalid variable decorator.
Description
Function <function-name> can't be used as a variable decorator.
Level
Error
Solutions
Use the valid decorators for variable declarations. For more information, see Decorators.
Examples
The following example raises the diagnostic because @minLength()
is not a valid variable decorator.
@minLength()
var name = uniqueString(resourceGroup().id)
The valid variable decorators are @description()
and @export()
.
Next steps
For more information about Bicep diagnostics, see Bicep core diagnostics.