Bicep error code - BCP338

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

Error description

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

Solution

Check the parameter value.

Examples

The following Bicep parameter file raises the error 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 error by assigning a string whose length is within the allowable range.

Next steps

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