title: Copy storage accounts and output connection strings
body: <p>I need to deploy N storage accounts and output connection strings as array or better comma separated unified string value. I found a very useful <a href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/resource-group-create-multiple" rel="nofollow noreferrer">article</a> on how to deploy multiple resources. Here is how I can create multiple storage accounts.</p>
  
  <pre><code>{
      "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
      "contentVersion": "1.0.0.0",
      "resources": [
          {
              "apiVersion": "2016-01-01",
              "type": "Microsoft.Storage/storageAccounts",
              "name": "[concat(copyIndex(),'storage', uniqueString(resourceGroup().id))]",
              "location": "[resourceGroup().location]",
              "sku": {
                  "name": "Standard_LRS"
              },
              "kind": "Storage",
              "properties": {},
              "copy": {
                  "name": "storagecopy",
                  "count": 3
              }
          }
      ],
      "outputs": {}
  }
  </code></pre>
  
  <p>Now the problem is, there is no info on how to iterate through storage accounts to output connection strings. Did anybody do something like this? How can I iterate through deployed storage accounts and output connection strings?</p>