Skip to content

Commit bc7e5c3

Browse files
authored
Merge pull request #295111 from mumian/0221-bcp-201
Add BCP201
2 parents b3b9d24 + 73d5ba1 commit bc7e5c3

File tree

4 files changed

+53
-2
lines changed

4 files changed

+53
-2
lines changed

articles/azure-resource-manager/bicep/bicep-core-diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ If you need more information about a particular diagnostic code, select the **Fe
201201
| <a id='BCP198' />BCP198 | Error | The tag "{badTag}" isn't valid. Valid characters are alphanumeric, ".", "_", or "-" but the tag can't begin with ".", "_", or "-". |
202202
| <a id='BCP199' />BCP199 | Error | Module path "{badRepository}" exceeds the maximum length of {maxLength} characters. |
203203
| <a id='BCP200' />BCP200 | Error | The registry "{badRegistry}" exceeds the maximum length of {maxLength} characters. |
204-
| <a id='BCP201' />BCP201 | Error | Expected a provider specification string of with a valid format at this location. Valid formats are "br:\<providerRegistryHost>/\<providerRepositoryPath>@\<providerVersion>" or "br/\<providerAlias>:\<providerName>@\<providerVersion>". |
204+
| <a id='BCP201' />[BCP201](./diagnostics/bcp201.md) | Error | Expected an extension specification string. This should either be a relative path, or a valid OCI artifact specification. |
205205
| <a id='BCP202' />BCP202 | Error | Expected a provider alias name at this location. |
206206
| <a id='BCP203' />BCP203 | Error | Using provider statements requires enabling EXPERIMENTAL feature "Extensibility". |
207207
| <a id='BCP204' />BCP204 | Error | Provider namespace "{identifier}" isn't recognized. |

articles/azure-resource-manager/bicep/bicep-extension.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.date: 12/06/2024
88

99
# Use Bicep extensions
1010

11-
This article describes how to use Bicep extensions.
11+
Bicep was initially created to enhance the authoring experience compared to Azure Resource Manager JSON templates, simplifying the deployment and management of Azure resources. Bicep extensions build on this foundation, enabling Bicep templates to reference resources beyond the scope of Azure Resource Manager. This article describes how to use Bicep extensions.
1212

1313
> [!NOTE]
1414
> The experimental feature `extensibility` must be enabled from the [Bicep config file](./bicep-config.md#enable-experimental-features) to use this feature.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: BCP201
3+
description: Expected an extension specification string. This should either be a relative path, or a valid OCI artifact specification.
4+
ms.topic: reference
5+
ms.custom: devx-track-bicep
6+
ms.date: 02/21/2025
7+
---
8+
9+
# Bicep diagnostic code - BCP201
10+
11+
[Bicep extensions](../bicep-extension.md) enable Bicep files to reference resources beyond the scope of Azure Resource Manager. This diagnostic occurs when there's an invalid `extension` statement.
12+
13+
## Description
14+
15+
Expected an extension specification string. This should either be a relative path, or a valid [OCI artifact](/azure/container-registry/container-registry-image-formats#oci-artifacts) specification.
16+
17+
## Level
18+
19+
Error
20+
21+
## Solution
22+
23+
Remove Use a name of a value.
24+
25+
## Examples
26+
27+
The following example raises the diagnostic because the `extension` statement is invalid:
28+
29+
```bicep
30+
extension 1
31+
```
32+
33+
You can fix the diagnostic by using the correct `extension` statement. For example:
34+
35+
```bicep
36+
@secure()
37+
param kubeConfig string
38+
39+
extension kubernetes with {
40+
namespace: 'default'
41+
kubeConfig: kubeConfig
42+
} as k8s
43+
```
44+
45+
For more information, see [Bicep extension](../bicep-extension.md).
46+
47+
## Next steps
48+
49+
For more information about Bicep diagnostics, see [Bicep core diagnostics](../bicep-core-diagnostics.md).

articles/azure-resource-manager/bicep/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,8 @@
697697
href: diagnostics/bcp170.md
698698
- name: BCP192
699699
href: diagnostics/bcp192.md
700+
- name: BCP201
701+
href: diagnostics/bcp201.md
700702
- name: BCP238
701703
href: diagnostics/bcp238.md
702704
- name: BCP266

0 commit comments

Comments
 (0)