0
votes

I am trying to create an ARM template for my runbook with additional variables ab packages.

I want to have the values of Automation Account Variables as parameters of ARM template.

When I am using the documentation syntax I am getting the variables value as "[parameters(parameterName)] instead the value of the parameter

when I am not using the syntax code I just get this error:

Invalid JSON - Kindly check the value of the variable

This is the ARM template resource code:

{
            "apiVersion": "2020-01-13-preview",
            "type": "Microsoft.Automation/automationAccounts/variables",
            "name": "[concat(parameters('AutomationAccount'), '/blobContainerName')]",
            "location": "[parameters('automationRegion')]",
            "properties": {
                "description": "output container name",
                "isEncrypted": false,
                "value": "\"[parameters('blobContainerName')]\""
            }
}

how its looks like in the variables after deployment: enter image description here

1

1 Answers

0
votes

Try the following:

  "properties": {
    "value": "[concat('\"', parameters('blobContainerName'), '\"')]"
   },

You need to use concat to join the strings