| title | BCP201 |
|---|---|
| description | Expected an extension specification string. This should either be a relative path, or a valid OCI artifact specification. |
| ms.topic | reference |
| ms.custom | devx-track-bicep |
| ms.date | 10/30/2025 |
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.
Expected an extension specification string. This should either be a relative path, or a valid OCI artifact specification.
Error
Remove Use a name of a value.
The following example raises the diagnostic because the extension statement is invalid:
extension 1You can fix the diagnostic by using the correct extension statement. For example:
@secure()
param kubeConfig string
extension kubernetes with {
namespace: 'default'
kubeConfig: kubeConfig
} as k8sFor more information, see Bicep extension.
For more information about Bicep diagnostics, see Bicep core diagnostics.