Bicep error code - BCP057

This error occurs when the referenced name doesn't exist, either due to a typo or because it hasn't been declared. If it's a typo, you'll encounter BCP082 when the compiler identifies and suggests a similarly named symbol.

Error description

The name <name> does not exist in the current context.

Solution

Fix the typo or declare the symbol.

Examples

The following example raises the error because bar has never been declared:

var foo = bar 

The following example raises the error because bar1 is a typo:

var bar = 'white'
var foo = bar1 

You can fix the error by declaring bar, or fix the typo.

var bar = 'white'
var foo = bar 

Next steps

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