Create multiple data disks with a property copy in an ARM Template

When you had to create a N number of items from a property in an ARM object, you had to create an array and take N from that array. With the new copy functionality you are able to do a copy on an property in resource deployment object. For disks this can look like:

           "copy": [
              "name": "dataDisks",
              "count": "[parameters('dataDiskCount')]",
              "input": {
                "diskSizeGB": "1023",
                "lun": "[copyIndex('dataDisks')]",
                "createOption": "Empty"

This new feature will make the creation of multiple properties a lot easier. For a full sample you can look at: Ryan Jones GitHub.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: