Skip to content

Commit ead49c7

Browse files
committed
incorporate Jonny's feedback
1 parent 1259e36 commit ead49c7

12 files changed

+82
-51
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
title: BCP033
3-
description: Error - Expected a value of type <data-type> but the provided value is of type <data-type>.
3+
description: Error/warning - Expected a value of type <data-type> but the provided value is of type <data-type>.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
66
ms.date: 06/28/2024
77
---
88

9-
# Bicep error code - BCP033
9+
# Bicep error/warning code - BCP033
1010

11-
This error occurs when you assign a value of a mismatched data type.
11+
This error/warning occurs when you assign a value of a mismatched data type.
1212

13-
## Error description
13+
## Error/warning description
1414

1515
`Expected a value of type <data-type> but the provided value is of type <data-type>.`
1616

@@ -38,4 +38,4 @@ output myString string = myValue
3838

3939
## Next steps
4040

41-
For more information about Bicep warning and error codes, see [Bicep warnings and errors](./bicep-error-codes.md).
41+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](./bicep-error-codes.md).

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
title: BCP035
3-
description: Warning - The specified <data-type> declaration is missing the following required properties <property-name>.
3+
description: Error/warning - The specified <data-type> declaration is missing the following required properties <property-name>.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
66
ms.date: 06/28/2024
77
---
88

9-
# Bicep warning code - BCP035
9+
# Bicep error/warning code - BCP035
1010

11-
This warning occurs when your resource definition is missing a required property.
11+
This error/warning occurs when your resource definition is missing a required property.
1212

13-
## Warning description
13+
## Error/warning description
1414

1515
`The specified <date-type> declaration is missing the following required properties: <property-name>.`
1616

@@ -80,4 +80,4 @@ resource networkConnection 'Microsoft.Network/connections@2023-11-01' = {
8080

8181
## Next steps
8282

83-
For more information about Bicep warning and error codes, see [Bicep warnings and errors](./bicep-error-codes.md).
83+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](./bicep-error-codes.md).

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
title: BCP036
3-
description: Error - The property <property-name> expected a value of type <data-type> but the provided value is of type <data-type>.
3+
description: Error/warning - The property <property-name> expected a value of type <data-type> but the provided value is of type <data-type>.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
66
ms.date: 07/12/2024
77
---
88

9-
# Bicep error code - BCP036
9+
# Bicep error/warning code - BCP036
1010

11-
This error occurs when you assign a value to a property using a data type that differs from the one defined in the [user-defined data type](./user-defined-data-types.md).
11+
This error/warning occurs when you assign a value to a property whose expected data type is not compatible with that of the assigned value.
1212

13-
## Error description
13+
## Error/warning description
1414

1515
`The property <property-name> expected a value of type <data-type> but the provided value is of type <data-type>.`
1616

@@ -50,4 +50,4 @@ param foo storageAccountConfigType = {
5050

5151
## Next steps
5252

53-
For more information about Bicep warning and error codes, see [Bicep warnings and errors](./bicep-error-codes.md).
53+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](./bicep-error-codes.md).

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

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.date: 07/12/2024
88

99
# Bicep warning code - BCP037
1010

11-
This warning occurs when you specify a property that isn't defined in a [user-defined data type](./user-defined-data-types.md).
11+
This warning occurs when you specify a property that isn't defined in a resource type.
1212

1313
## Warning description
1414

@@ -49,6 +49,37 @@ param foo storageAccountConfigType = {
4949
}
5050
```
5151

52+
The following example raises the error because `obj` is a sealed type and does not define a `baz` property.
53+
54+
```bicep
55+
@sealed()
56+
type obj = {
57+
foo: string
58+
bar: string
59+
}
60+
61+
param p obj = {
62+
foo: 'foo'
63+
bar: 'bar'
64+
baz: 'baz'
65+
}
66+
```
67+
68+
You can fix teh issue by removing the property:
69+
70+
```bicep
71+
@sealed()
72+
type obj = {
73+
foo: string
74+
bar: string
75+
}
76+
77+
param p obj = {
78+
foo: 'foo'
79+
bar: 'bar'
80+
}
81+
```
82+
5283
## Next steps
5384

54-
For more information about Bicep warning and error codes, see [Bicep warnings and errors](./bicep-error-codes.md).
85+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](./bicep-error-codes.md).

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
title: BCP040
3-
description: Warning - String interpolation is not supported for keys on objects of type <type-definition>.
3+
description: Error/warning - String interpolation is not supported for keys on objects of type <type-definition>.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
66
ms.date: 07/12/2024
77
---
88

9-
# Bicep warning code - BCP040
9+
# Bicep error/warning code - BCP040
1010

11-
This warning occurs when you use string interpolation to specify a key of a [user-defined data type](./user-defined-data-types.md).
11+
This error/warning occurs when the Bicep compiler cannot determine the exact value of an interpolated string key.
1212

13-
## Warning description
13+
## Error/warning description
1414

1515
`String interpolation is not supported for keys on objects of type <type-definition>.`
1616

@@ -54,4 +54,4 @@ param foo storageAccountConfigType = {
5454

5555
## Next steps
5656

57-
For more information about Bicep warning and error codes, see [Bicep warnings and errors](./bicep-error-codes.md).
57+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](./bicep-error-codes.md).

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
title: BCP053
3-
description: Error - The type <resource-type> does not contain property <property-name>. Available properties include <property-names>.
3+
description: Error/warning - The type <resource-type> 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/12/2024
77
---
88

9-
# Bicep error code - BCP053
9+
# Bicep error/warning code - BCP053
1010

11-
This error occurs when you reference a property that is not defined in the resource type.
11+
This error/warning occurs when you reference a property that is not defined in the resource type or [user-defined data type](./user-defined-data-types.md).
1212

13-
## Error description
13+
## Error/warning description
1414

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

@@ -56,4 +56,4 @@ output foo string = storage.name
5656

5757
## Next steps
5858

59-
For more information about Bicep warning and error codes, see [Bicep warnings and errors](./bicep-error-codes.md).
59+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](./bicep-error-codes.md).

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ output outValue string = foo
3939

4040
## Next steps
4141

42-
For more information about Bicep warning and error codes, see [Bicep warnings and errors](./bicep-error-codes.md).
42+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](./bicep-error-codes.md).

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ resource blobService 'Microsoft.Storage/storageAccounts/blobServices@2023-04-01'
6363

6464
## Next steps
6565

66-
For more information about Bicep warning and error codes, see [Bicep warnings and errors](./bicep-error-codes.md).
66+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](./bicep-error-codes.md).

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
title: BCP327
3-
description: Error - The provided value (which will always be greater than or equal to <value>) is too large to assign to a target for which the maximum allowable value is <max-value>.
3+
description: Error/warning - The provided value (which will always be greater than or equal to <value>) is too large to assign to a target for which the maximum allowable value is <max-value>.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
66
ms.date: 07/02/2024
77
---
88

9-
# Bicep error code - BCP327
9+
# Bicep error/warning code - BCP327
1010

11-
This error occurs when you assign a value that is greater than the allowable value.
11+
This error/warning occurs when you assign a value that is greater than the allowable value.
1212

13-
## Error description
13+
## Error/warning description
1414

1515
`The provided value (which will always be greater than or equal to <value>) is too large to assign to a target for which the maximum allowable value is <max-value>.`
1616

@@ -40,4 +40,4 @@ param month int = 12
4040

4141
## Next steps
4242

43-
For more information about Bicep warning and error codes, see [Bicep warnings and errors](./bicep-error-codes.md).
43+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](./bicep-error-codes.md).

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
22
title: BCP328
3-
description: Error - The provided value (which will always be less than or equal to <value>) is too small to assign to a target for which the minimum allowable value is <min-value>.
3+
description: Error/warning - The provided value (which will always be less than or equal to <value>) is too small to assign to a target for which the minimum allowable value is <min-value>.
44
ms.topic: reference
55
ms.custom: devx-track-bicep
66
ms.date: 07/12/2024
77
---
88

9-
# Bicep error code - BCP328
9+
# Bicep error/warning code - BCP328
1010

11-
This error occurs when you assign a value that is less than the allowable value.
11+
This error/warning occurs when you assign a value that is less than the allowable value.
1212

13-
## Error description
13+
## Error/warning description
1414

1515
`The provided value (which will always be less than or equal to <value>) is too small to assign to a target for which the minimum allowable value is <min-value>.`
1616

@@ -39,4 +39,4 @@ param month int = 1
3939

4040
## Next steps
4141

42-
For more information about Bicep warning and error codes, see [Bicep warnings and errors](./bicep-error-codes.md).
42+
For more information about Bicep error and warning codes, see [Bicep warnings and errors](./bicep-error-codes.md).

0 commit comments

Comments
 (0)