Skip to content

Commit 219d1e2

Browse files
committed
add bcp052 and bcp077
1 parent f456454 commit 219d1e2

File tree

3 files changed

+60
-2
lines changed

3 files changed

+60
-2
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: BCP052
3+
description: Error/warning - The type <type-name> does not contain property <property-name>.
4+
ms.topic: reference
5+
ms.custom: devx-track-bicep
6+
ms.date: 08/06/2024
7+
---
8+
9+
# Bicep error/warning code - BCP052
10+
11+
This error/warning occurs when you reference a property that isn't defined in the [data type](../data-types.md).
12+
13+
## Error/warning description
14+
15+
`The type <type-name> does not contain property <property-name>.`
16+
17+
## Examples
18+
19+
The following example raises the error _object_ doesn't contain a property called _bar_:
20+
21+
```bicep
22+
type missingProperty = object.bar
23+
```
24+
25+
## Next steps
26+
27+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](../bicep-core-diagnostics.md).

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: BCP053
3-
description: Error/warning - The type <resource-type> does not contain property <property-name>. Available properties include <property-names>.
3+
description: Error/warning - The type <type-name> does not contain property <property-name>. Available properties include <property-names>.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
66
ms.date: 07/15/2024
@@ -12,7 +12,7 @@ This error/warning occurs when you reference a property that isn't defined in th
1212

1313
## Error/warning description
1414

15-
`The type <resource-type> does not contain property <property-name>. Available properties include <property-names>.`
15+
`The type <type-name> does not contain property <property-name>. Available properties include <property-names>.`
1616

1717
## Solution
1818

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: BCP077
3+
description: Error/warning - The property <property-name> on type <type-name> is write-only. Write-only properties cannot be accessed.
4+
ms.topic: reference
5+
ms.custom: devx-track-bicep
6+
ms.date: 08/06/2024
7+
---
8+
9+
# Bicep error/warning code - BCP077
10+
11+
This error/warning occurs when you reference a property that is write-only.
12+
13+
## Error/warning description
14+
15+
`The property <property-name> on type <type-name> is write-only. Write-only properties cannot be accessed.`
16+
17+
## Examples
18+
19+
The following example raises the warning because `customHeaders` is write-only.
20+
21+
```bicep
22+
resource webhook 'Microsoft.ContainerRegistry/registries/webhooks@2023-07-01' existing = {
23+
name: 'registry/webhook'
24+
}
25+
26+
output customerHeaders object = webhook.properties.customHeaders
27+
```
28+
29+
## Next steps
30+
31+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](../bicep-core-diagnostics.md).

0 commit comments

Comments
 (0)