Bicep diagnostic code - BCP338

This diagnostic occurs when Bicep can't resolve a parameter name in the Bicep parameters file.

Description

Failed to evaluate parameter <parameter-name>: <diagnostic-message>.

Level

Error

Solution

Check the parameter value.

Examples

The following Bicep parameters file raises the diagnostic because testEnvironmentVariable can't be found:

using 'main.bicep'
param parTest = readEnvironmentVariable('testEnvironmentVariable')

It could be because the environment variable isn't defined in the user or system level. For more information, see readEnvironmentVariable You can fix the diagnostic by assigning a string whose length is within the allowable range.

Next steps

For more information about Bicep diagnostics, see Bicep core diagnostics.