简体   繁体   中英

Azure ARM template for Automation Account Variable - cant use paramets as value

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: 在此处输入图像描述

Try the following:

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

You need to use concat to join the strings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM