Bicep error code - BCP072

This error occurs when you reference a variable in parameter default values.

Error description

This symbol cannot be referenced here. Only other parameters can be referenced in parameter default values.

Solution

Reference another parameter instead.

Examples

The following example raises the error because the parameter default value references a variable:

param foo string = bar

var bar = 'HelloWorld!'

You can fix the error by referencing another parameter:

param foo string = bar
param bar string = 'HelloWorld!'

output outValue string = foo

Next steps

For more information about Bicep error and warning codes, see Bicep warnings and errors.