I am using the following ARM Template and Parameter file to create Multiple Azure Blob api connections.
To access the storage key i am using variables ""storageAccountId": "[resourceId('Microsoft.Storage/storageAccounts', parameters('apiconname')[copyIndex(apiconname)].properties.accountName)]". It needs to get the storage account name from the paramater file apiconname which is declare as "Array" to create multiple connections. Now the problem is the storage account name is not fetching from paramater file. Please help me on this.
Deployment template validation failed: 'The template variable 'storageAccountId' is not valid: The template function 'copyIndex' is not expected at this location. The function can only be used in a resource with copy specified. Please see https://aka.ms/arm-copy for usage details.. Please see https://aka.ms/arm-template-expressions for usage details.'. (Code: InvalidTemplate)