Bicep error code - BCP057

This error occurs when the referenced name doesn't exist, either because of a typo or because it hasn't been declared.

Error description

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

Solution

Fix the typo or declare the name.

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.