Rediger

Del via


Bicep diagnostic code - BCP201

Bicep extensions enable Bicep files to reference resources beyond the scope of Azure Resource Manager. This diagnostic occurs when there's an invalid extension statement.

Description

Expected an extension specification string. This should either be a relative path, or a valid OCI artifact specification.

Level

Error

Solution

Remove Use a name of a value.

Examples

The following example raises the diagnostic because the extension statement is invalid:

extension 1

You can fix the diagnostic by using the correct extension statement. For example:

@secure()
param kubeConfig string

extension kubernetes with {
  namespace: 'default'
  kubeConfig: kubeConfig
} as k8s

For more information, see Bicep extension.

Next steps

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