You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/data-types.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -319,7 +319,7 @@ is ${blocked}'''
319
319
320
320
## Union types
321
321
322
-
In Bicep, a union type allows the creation of a combined type consisting of a set of sub-types. An assignment is valid if any of the individual sub-type assignments are permitted. The `|` character separates individual sub-types using an _or_ condition. For example, the syntax _'a' | 'b'_ means that a valid assignment could be either _'a'_ or _'b'_. Union types are translated into the [allowed-value](../templates/definitions.md#allowed-values) constraint in Bicep, so only literals are permitted as members. Unions can include any number of literal-typed expressions.
322
+
In Bicep, a union type allows the creation of a combined type consisting of a set of subtypes. An assignment is valid if any of the individual subtype assignments are permitted. The `|` character separates individual subtypes using an _or_ condition. For example, the syntax _'a' | 'b'_ means that a valid assignment could be either _'a'_ or _'b'_. Union types are translated into the [allowed-value](../templates/definitions.md#allowed-values) constraint in Bicep, so only literals are permitted as members. Unions can include any number of literal-typed expressions.
323
323
324
324
```bicep
325
325
type color = 'Red' | 'Blue' | 'White'
@@ -335,7 +335,7 @@ Type unions must be reducible to a single ARM type, such as 'string', 'int', or
335
335
type foo = 'a' | 1
336
336
```
337
337
338
-
Any type expression can be used as a sub-type in a union type declaration (between `|` characters). For example, the following examples are all valid:
338
+
Any type expression can be used as a subtype in a union type declaration (between `|` characters). For example, the following examples are all valid:
339
339
340
340
```bicep
341
341
type foo = 1 | 2
@@ -379,7 +379,7 @@ There are some limitations with union type.
379
379
```
380
380
381
381
* Only literals are permitted as members.
382
-
* All literals must be of the same primitive data type (e.g., all strings or all integers).
382
+
* All literals must be of the same primitive data type (for example, all strings or all integers).
383
383
384
384
The union type syntax can be used in [user-defined data types](./user-defined-data-types.md).
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/file.md
+21-20Lines changed: 21 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,31 +104,32 @@ The allowed values are:
104
104
105
105
In a module, you can specify a scope that is different than the scope for the rest of the Bicep file. For more information, see [Configure module scope](modules.md#set-module-scope)
106
106
107
-
## Decorator
107
+
## Decorators
108
108
109
109
You can add one or more decorators for each of the following elements:
110
110
111
-
*[Parameter](#parameters)
112
-
*[Variable](#variables)
113
-
*[Resource](#resources)
114
-
*[Module](#modules)
115
-
*[Output](#outputs)
116
-
*[Type](#types)
111
+
*[param](#parameters)
112
+
*[var](#variables)
113
+
*[resource](#resources)
114
+
*[module](#modules)
115
+
*[output](#outputs)
116
+
*[func](#functions)
117
+
*[type](#types)
117
118
118
119
| Decorator | Apply to element | Apply to data type | Argument | Description |
119
120
| --------- | ---- | ----------- | ------- |
120
-
| allowed |[parameter](./parameters.md#allowed-values)| all | array | Use this decorator to make sure the user provides correct values. This decorator is only permitted on `param` statements. To declare that a property must be one of a set of predefined values in a [`type`](./user-defined-data-types.md) or [`output`](./outputs.md) statement, use [union type syntax](./data-types.md#union-types). Union type syntax can also be used in `param` statements.|
121
+
| allowed |[param](./parameters.md#allowed-values)| all | array | Use this decorator to make sure the user provides correct values. This decorator is only permitted on `param` statements. To declare that a property must be one of a set of predefined values in a [`type`](./user-defined-data-types.md) or [`output`](./outputs.md) statement, use [union type syntax](./data-types.md#union-types). Union type syntax can also be used in `param` statements.|
121
122
| batchSize |[resource](./resource-declaration.md#batchsize), [module](./modules.md#batchsize)| N/A | integer | Set up instances to deploy sequentially. |
122
-
| description |[parameter](./parameters.md#description), [variable](./variables.md#description), [resource](./resource-declaration.md#description), [module](./modules.md#description), [output](./outputs.md#description), [type](./user-defined-data-types.md#description), [function](./user-defined-functions.md#description)| all | string | Text that explains how to use the element. |
123
-
| discriminator |[parameter](./parameters.md#discriminator, [type](./user-defined-data-types.md#discriminator), [output](./outputs.md#discriminator)| object | string | Use this decorator to ensure the correct subclass is identified and managed. For more information, see [Custom-tagged union data type](./data-types.md#custom-tagged-union-data-type).|
124
-
| export |[variable](./variables.md#export), [type](./user-defined-data-types.md#export), [function](./user-defined-functions.md#export)| all | none| Indicates that the element can be imported by another Bicep file. |
125
-
| maxLength |[parameter](./parameters.md#length-constraints), [output](./outputs.md#length-constraints)| array, string | int | The maximum length for string and array elemenets. The value is inclusive. |
126
-
| maxValue |[parameter](./parameters.md#integer-constraints), [output](./outputs.md#integer-constraints)| int | int | The maximum value for the integer elements. This value is inclusive. |
127
-
| metadata |[parameter](./parameters.md#metadata), [output](./outputs.md#metadata)| all | object | Custom properties to apply to the elements. Can include a description property that is equivalent to the description decorator. |
128
-
| minLength |[parameter](./parameters.md#length-constraints), [output](./outputs.md#length-constraints)| array, string | int | The minimum length for string and array elements. The value is inclusive. |
129
-
| minValue |[parameter](./parameters.md#integer-constraints), [output](./outputs.md#integer-constraints)| int | int | The minimum value for the integer elements. This value is inclusive. |
130
-
| sealed |[parameter](./parameters.md#sealed), [type](./user-defined-data-types.md#sealed), [output](./outputs.md#sealed)| object | none | Elevate [BCP089](./diagnostics/bcp089.md) from a warning to an error when a property name of a use-define data type is likely a typo. For more information, see [Elevate error level](./user-defined-data-types.md#elevate-error-level). |
131
-
| secure |[parameter](./parameters.md#secure-parameters)| string, object | none | Marks the parameter as secure. The value for a secure parameter isn't saved to the deployment history and isn't logged. For more information, see [Secure strings and objects](data-types.md#secure-strings-and-objects). |
123
+
| description |[param](./parameters.md#description), [var](./variables.md#description), [resource](./resource-declaration.md#description), [module](./modules.md#description), [output](./outputs.md#description), [type](./user-defined-data-types.md#description), [func](./user-defined-functions.md#description)| all | string | Text that explains how to use the element. |
124
+
| discriminator |[param](./parameters.md#discriminator), [type](./user-defined-data-types.md#discriminator), [output](./outputs.md#discriminator)| object | string | Use this decorator to ensure the correct subclass is identified and managed. For more information, see [Custom-tagged union data type](./data-types.md#custom-tagged-union-data-type).|
125
+
| export |[var](./variables.md#export), [type](./user-defined-data-types.md#export), [func](./user-defined-functions.md#export)| all | none| Indicates that the element can be imported by another Bicep file. |
126
+
| maxLength |[param](./parameters.md#length-constraints), [output](./outputs.md#length-constraints)| array, string | int | The maximum length for string and array elements. The value is inclusive. |
127
+
| maxValue |[param](./parameters.md#integer-constraints), [output](./outputs.md#integer-constraints)| int | int | The maximum value for the integer elements. This value is inclusive. |
128
+
| metadata |[param](./parameters.md#metadata), [output](./outputs.md#metadata)| all | object | Custom properties to apply to the elements. Can include a description property that is equivalent to the description decorator. |
129
+
| minLength |[param](./parameters.md#length-constraints), [output](./outputs.md#length-constraints)| array, string | int | The minimum length for string and array elements. The value is inclusive. |
130
+
| minValue |[param](./parameters.md#integer-constraints), [output](./outputs.md#integer-constraints)| int | int | The minimum value for the integer elements. This value is inclusive. |
131
+
| sealed |[param](./parameters.md#sealed), [type](./user-defined-data-types.md#sealed), [output](./outputs.md#sealed)| object | none | Elevate [BCP089](./diagnostics/bcp089.md) from a warning to an error when a property name of a use-define data type is likely a typo. For more information, see [Elevate error level](./user-defined-data-types.md#elevate-error-level). |
132
+
| secure |[param](./parameters.md#secure-parameters)| string, object | none | Marks the parameter as secure. The value for a secure parameter isn't saved to the deployment history and isn't logged. For more information, see [Secure strings and objects](data-types.md#secure-strings-and-objects). |
132
133
133
134
## Parameters
134
135
@@ -435,7 +436,7 @@ The preceding example is equivalent to the following JSON.
435
436
436
437
## Multiple-line declarations
437
438
438
-
You can now use multiple lines in function, array and object declarations. This feature requires [Bicep CLI version 0.7.X or higher](./install.md).
439
+
You can now use multiple lines in function, array, and object declarations. This feature requires [Bicep CLI version 0.7.X or higher](./install.md).
439
440
440
441
In the following example, the `resourceGroup()` definition is broken into multiple lines.
441
442
@@ -450,7 +451,7 @@ See [Arrays](./data-types.md#arrays) and [Objects](./data-types.md#objects) for
450
451
## Known limitations
451
452
452
453
* No support for the concept of apiProfile, which is used to map a single apiProfile to a set apiVersion for each resource type.
453
-
* User-defined functions are not supported at the moment. However, an experimental feature is currently accessible. For more information, see [User-defined functions in Bicep](./user-defined-functions.md).
454
+
* User-defined functions aren't supported at the moment. However, an experimental feature is currently accessible. For more information, see [User-defined functions in Bicep](./user-defined-functions.md).
454
455
* Some Bicep features require a corresponding change to the intermediate language (Azure Resource Manager JSON templates). We announce these features as available when all of the required updates have been deployed to global Azure. If you're using a different environment, such as Azure Stack, there may be a delay in the availability of the feature. The Bicep feature is only available when the intermediate language has also been updated in that environment.
> Non-AVM (Azure Verified Modules) modules are retired from the public module registry.
158
158
159
-
[Azure Verified Modules](https://azure.github.io/Azure-Verified-Modules/) are prebuilt, pretested, and preverified modules for deploying resources on Azure. Created and owned by Microsoft employees, these modules are designed to simplify and accelerate the deployment process for common Azure resources and configurations whilst also aligning to best practices; such as the Well-Architected Framework.
159
+
[Azure Verified Modules](https://azure.github.io/Azure-Verified-Modules/) are prebuilt, pretested, and preverified modules for deploying resources on Azure. Created and owned by Microsoft employees, these modules are designed to simplify and accelerate the deployment process for common Azure resources and configurations while also aligning to best practices; such as the Well-Architected Framework.
160
160
161
161
Browse to the [Azure Verified Modules Bicep Index](https://azure.github.io/Azure-Verified-Modules/indexes/bicep/)to see the list of modules available, select the highlighted numbers in the following screenshot to be taken directly to that filtered view.
162
162
@@ -275,44 +275,44 @@ Decorators are written in the format `@expression` and are placed above module d
275
275
276
276
| Decorator | Argument | Description |
277
277
| --------- | ----------- | ------- |
278
-
|[description](#description)| string |Provide descriptions for the module.|
279
278
|[batchSize](./bicep-import.md#export-variables-types-and-functions)| none | Set up instances to deploy sequentially. |
279
+
|[description](#description)| string |Provide descriptions for the module.|
280
280
281
281
Decorators are in the [sys namespace](bicep-functions.md#namespaces-for-functions). If you need to differentiate a decorator from another item with the same name, preface the decorator with `sys`. For example, if your Bicep file includes a parameter named `description`, you must add the sys namespace when using the **description** decorator.
282
282
283
-
### Description
283
+
### BatchSize
284
284
285
-
To add explaination, add a description to module declarations. For example:
285
+
You can only apply `@batchSize()` to a resource or module definition that uses a [`for` expression](./loops.md).
286
+
287
+
By default, modules are deployed in parallel. When you add the `@batchSize(int)` decorator, you deploy instances serially.
286
288
287
289
```bicep
288
-
@description('Create storage accounts referencing an AVM.')
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/outputs.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.date: 08/20/2024
8
8
9
9
# Outputs in Bicep
10
10
11
-
This article describes how to define output values in a Bicep file. You use outputs when you need to return values from the deployed resources. You are limited to 64 outputs in a Bicep file. For more information, see [Template limits](../templates/best-practices.md#template-limits).
11
+
This article describes how to define output values in a Bicep file. You use outputs when you need to return values from the deployed resources. You're limited to 64 outputs in a Bicep file. For more information, see [Template limits](../templates/best-practices.md#template-limits).
12
12
13
13
## Define outputs
14
14
@@ -58,7 +58,7 @@ For more information, see [User-defined data types](./user-defined-data-types.md
58
58
59
59
## Use decorators
60
60
61
-
Decorators are written in the format `@expression` and are placed above ouput declarations. The following table shows the available decorators for outputs.
61
+
Decorators are written in the format `@expression` and are placed above output declarations. The following table shows the available decorators for outputs.
62
62
63
63
| Decorator | Apply to | Argument | Description |
64
64
| --------- | ---- | ----------- | ------- |
@@ -82,7 +82,7 @@ param description string
82
82
83
83
### Description
84
84
85
-
To add explaination, add a description to output declarations. For example:
85
+
To add explanation, add a description to output declarations. For example:
86
86
87
87
```bicep
88
88
@description('Conditionally output the endpoint.')
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/resource-declaration.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.date: 08/20/2024
8
8
9
9
# Resource declaration in Bicep
10
10
11
-
This article describes the syntax you use to add a resource to your Bicep file. You are limited to 800 resources in a Bicep file. For more information, see [Template limits](../templates/best-practices.md#template-limits).
11
+
This article describes the syntax you use to add a resource to your Bicep file. You're limited to 800 resources in a Bicep file. For more information, see [Template limits](../templates/best-practices.md#template-limits).
12
12
13
13
## Define resources
14
14
@@ -66,38 +66,38 @@ Decorators are written in the format `@expression` and are placed above resource
66
66
67
67
| Decorator | Argument | Description |
68
68
| --------- | ----------- | ------- |
69
-
|[description](#description)| string | Provide descriptions for the resource. |
70
69
|[batchSize](./bicep-import.md#export-variables-types-and-functions)| none | Set up instances to deploy sequentially. |
70
+
|[description](#description)| string | Provide descriptions for the resource. |
71
71
72
72
Decorators are in the [sys namespace](bicep-functions.md#namespaces-for-functions). If you need to differentiate a decorator from another item with the same name, preface the decorator with `sys`. For example, if your Bicep file includes a parameter named `description`, you must add the sys namespace when using the **description** decorator.
73
73
74
-
### Description
74
+
### BatchSize
75
+
76
+
You can only apply `@batchSize()` to a resource or module definition that uses a [`for` expression](./loops.md).
75
77
76
-
To add explaination, add a description to resource declarations. For example:
78
+
By default, resources are deployed in parallel. When you add the `batchSize(int)` decorator, you deploy instances serially.
77
79
78
80
```bicep
79
-
@description('Create a number of storage accounts')
81
+
@batchSize(3)
80
82
resource storageAccountResources 'Microsoft.Storage/storageAccounts@2023-04-01' = [for storageName in storageAccounts: {
81
83
...
82
84
}]
83
85
```
84
86
85
-
Markdown-formatted text can be used for the description text.
86
-
87
-
### BatchSize
87
+
For more information, see [Deploy in batches](loops.md#deploy-in-batches).
88
88
89
-
You can only apply `@batchSize()` to a resource or module definition that uses a [`for` expression](./loops.md).
89
+
### Description
90
90
91
-
By default, resources are deployed in parallel. When you add the `batchSize(int)` decorator, you deploy instances serially.
91
+
To add explanation, add a description to resource declarations. For example:
92
92
93
93
```bicep
94
-
@batchSize(3)
94
+
@description('Create a number of storage accounts')
95
95
resource storageAccountResources 'Microsoft.Storage/storageAccounts@2023-04-01' = [for storageName in storageAccounts: {
96
96
...
97
97
}]
98
98
```
99
99
100
-
For more information, see [Deploy in batches](loops.md#deploy-in-batches).
100
+
Markdown-formatted text can be used for the description text.
0 commit comments