Skip to content

Commit ab7dc6d

Browse files
authored
Merge pull request #183373 from davidsmatlak/ds-ghi-85476
Removes duplicate content
2 parents 6109e56 + 713ba5e commit ab7dc6d

File tree

1 file changed

+5
-34
lines changed

1 file changed

+5
-34
lines changed

articles/azure-resource-manager/templates/copy-properties.md

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Define multiple instances of a property
33
description: Use copy operation in an Azure Resource Manager template (ARM template) to iterate multiple times when creating a property on a resource.
44
ms.topic: conceptual
5-
ms.date: 05/07/2021
5+
ms.date: 12/20/2021
66
---
77

88
# Property iteration in ARM templates
@@ -93,7 +93,7 @@ The following example shows how to apply copy loop to the `dataDisks` property o
9393
}
9494
```
9595

96-
Notice that when using `copyIndex` inside a property iteration, you must provide the name of the iteration. Property iteration also supports an offset argument. The offset must come after the name of the iteration, such as `copyIndex('dataDisks', 1)`.
96+
Notice that when using [copyIndex](template-functions-numeric.md#copyindex) inside a property iteration, you must provide the name of the iteration. Property iteration also supports an offset argument. The offset must come after the name of the iteration, such as `copyIndex('dataDisks', 1)`.
9797

9898
The deployed template becomes:
9999

@@ -124,7 +124,7 @@ The deployed template becomes:
124124
...
125125
```
126126

127-
The copy operation is helpful when working with arrays because you can iterate through each element in the array. Use the `length` function on the array to specify the count for iterations, and `copyIndex` to retrieve the current index in the array.
127+
The copy operation is helpful when working with arrays because you can iterate through each element in the array. Use the [length](template-functions-array.md#length) function on the array to specify the count for iterations, and `copyIndex` to retrieve the current index in the array.
128128

129129
The following example template creates a failover group for databases that are passed in as an array.
130130

@@ -212,36 +212,7 @@ The `copy` element is an array so you can specify more than one property for the
212212
}
213213
```
214214

215-
The deployed template becomes:
216-
217-
```json
218-
{
219-
"name": "examplevm",
220-
"type": "Microsoft.Compute/virtualMachines",
221-
"apiVersion": "2020-06-01",
222-
"properties": {
223-
"storageProfile": {
224-
"dataDisks": [
225-
{
226-
"lun": 0,
227-
"createOption": "Empty",
228-
"diskSizeGB": 1023
229-
},
230-
{
231-
"lun": 1,
232-
"createOption": "Empty",
233-
"diskSizeGB": 1023
234-
},
235-
{
236-
"lun": 2,
237-
"createOption": "Empty",
238-
"diskSizeGB": 1023
239-
}
240-
],
241-
...
242-
```
243-
244-
You can use resource and property iteration together. Reference the property iteration by name.
215+
You can use resource and property iterations together. Reference the property iteration by name.
245216

246217
```json
247218
{
@@ -291,4 +262,4 @@ The following example shows a common scenario for creating more than one value f
291262
- [Variable iteration in ARM templates](copy-variables.md)
292263
- [Output iteration in ARM templates](copy-outputs.md)
293264
- If you want to learn about the sections of a template, see [Understand the structure and syntax of ARM templates](./syntax.md).
294-
- To learn how to deploy your template, see [Deploy resources with ARM templates and Azure PowerShell](deploy-powershell.md).
265+
- To learn how to deploy your template, see [Deploy resources with ARM templates and Azure PowerShell](deploy-powershell.md).

0 commit comments

Comments
 (0)