Creating multiple instances of a resource type, using Serial mode

In the previous section, we showed an example of parallel resource execution. In this section, we'll see how the same resources can be executed and provisioned in parallel. The parameters and variables section is the same as it was in the last example.

The resources section is shown next. The only difference in this example compared to the previous one is that the copy element is using Serial as the mode property value, which ensures that storage accounts are created one after another. The entire code for this ARM template is available with a chapter-accompanied code file: chapter-4 - listing2.txt:

  "resources": [
{
"apiVersion": "2018-02-01",
"name": "[concat(variables('storageAccountNameVar'), copyindex())]",
"location": "[resourceGroup().location]",
"type": "Microsoft.Storage/storageAccounts",
"sku": {
"name": "Standard_LRS"
},
"copy": {
"name": "storages",
"count": 2,
"mode": "Serial"
},
"kind": "StorageV2",
"properties": {
"encryption": {
"services": {
"blob": {
"enabled": true
},
"file": null
},
"keySource": "Microsoft.Storage"
}
}
}
]
}
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.248.37