Arm template: concatenate each element of an array with constant value

Viewed 3968

When creating an arm template is it possible to concatenate each element of an array with a constant string? Below is my created parameter and the resource I am trying to create.

  "parameters": {

    "servicesNames": {
      "type": "array",
      "defaultValue": [
        "test-api-content",
        "test-svc-content"
      ]
    }
  }

    {
      "apiVersion": "2016-03-30",
      "type": "Microsoft.Network/publicIPAddresses",
      "name": "[concat(parameters('servicesNames'),'pip')]",
      "location": "[resourceGroup().location]",
      "copy": {
        "name": "PIPaddresscopy",
        "count": "[length(parameters('servicesNames'))]"
      },
      "tags": {
        "displayName": "PublicIPAddress"
      }
   }

I would like the output of the resource name to be created with

"test-api-contentpip"

How ever I am getting the following error

The provided parameters for language function 'concat' are invalid. Either all or none of the parameters must be an array

Please suggest how I can concatenate each value of the element

2 Answers
Related