Skip to content

Commit 91a8b82

Browse files
committed
add bcp072
1 parent feb8ec7 commit 91a8b82

File tree

4 files changed

+45
-3
lines changed

4 files changed

+45
-3
lines changed

articles/azure-resource-manager/bicep/bicep-error-bcp033.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: BCP033
3-
description: Expected a value of type "{expectedType}" but the provided value is of type "{actualType}".
3+
description: Error - Expected a value of type "{expectedType}" but the provided value is of type "{actualType}".
44
ms.topic: reference
55
ms.custom: devx-track-bicep
66
ms.date: 05/30/2024

articles/azure-resource-manager/bicep/bicep-error-bcp035.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: BCP035
3-
description: The specified <data-type> declaration is missing the following required properties: <name-of-the-property>.
3+
description: Error - The specified <data-type> declaration is missing the following required properties.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
66
ms.date: 05/30/2024
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: BCP072
3+
description: Error - This symbol cannot be referenced here. Only other parameters can be referenced in parameter default values.
4+
ms.topic: reference
5+
ms.custom: devx-track-bicep
6+
ms.date: 06/20/2024
7+
---
8+
9+
# Bicep warning and error code - BCP072
10+
11+
This error occurs when you reference a variable in parameter default values.
12+
13+
## Error description
14+
15+
`This symbol cannot be referenced here. Only other parameters can be referenced in parameter default values.`
16+
17+
## Solution
18+
19+
Reference another parameter instead.
20+
21+
## Examples
22+
23+
The following example raises the error because the parameter default value references a variable:
24+
25+
```bicep
26+
param foo string = bar
27+
28+
var bar = 'HelloWorld!'
29+
```
30+
31+
You can fix the error by referencing another parameter:
32+
33+
```bicep
34+
param foo string = bar
35+
param bar string = 'HelloWorld!'
36+
37+
output outValue string = foo
38+
```
39+
40+
## Next steps
41+
42+
For more information about Bicep warning and error codes, see [Bicep warnings and errors](./bicep-error-codes.md).

articles/azure-resource-manager/bicep/bicep-error-codes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ If you need more information about a particular warning or error code, select th
7777
| BCP069 | The function "{function}" is not supported. Use the "{@operator}" operator instead. |
7878
| BCP070 | Argument of type "{argumentType}" is not assignable to parameter of type "{parameterType}". |
7979
| BCP071 | Expected {expected}, but got {argumentCount}. |
80-
| BCP072 | This symbol cannot be referenced here. Only other parameters can be referenced in parameter default values. |
80+
| [BCP072](./bicep-error-bcp072.md) | This symbol cannot be referenced here. Only other parameters can be referenced in parameter default values. |
8181
| BCP073 | The property "{property}" is read-only. Expressions cannot be assigned to read-only properties.{(showTypeInaccuracy ? TypeInaccuracyClause : string.Empty)} |
8282
| BCP074 | Indexing over arrays requires an index of type "{LanguageConstants.Int}" but the provided index was of type "{wrongType}". |
8383
| BCP075 | Indexing over objects requires an index of type "{LanguageConstants.String}" but the provided index was of type "{wrongType}". |

0 commit comments

Comments
 (0)