Expressions in template parameters

Does the workings of OD not allow functions/expression to be specified as parameter values ???

I have a template with this parameter

"systemStorageAccountName": {
  "type": "string",
  "minLength": 1,
  "defaultValue": "[concat('xxxyyyzzz', uniqueString(resourceGroup().id))]"
},

and then later use that parameter as the name of a storage account. Running natively via Visual Studio, this works fine. When pasting this template into an OctpusDeploy template step, that parameter is recognized and the default value is automatically entered in the parameters section of the step. However running the template produces a message:

Status Message: "{\r\n “error”: {\r\n “code”: “AccountNameInvalid”,\r\n “message”: “[concat(‘xxxyyyzzz’, uniqueString(resourceGroup().id))] is not a valid storage account name. Storage account name must be between 3 and 24 characters in length and use numbers and lower-case letters only.”\r\n }\r\n}"
October 12th 2016 11:23:09
Error

So, I first wipe out the value in the parameter that OctopusDeploy prestaged - no help.
I then get rid of the minlength value - no help

I finally change the structure of the template so that only the ‘xxxyyyzzz’ value is a parameter, and the actual derived storage account name is computed in a variable…that works.

Does the workings of OD not allow functions/expression to be specified as parameter values ???

Hi,

Thanks for reaching out. Any chance you can send the initial ARM JSON template (that wasn’t working) so I can test it on my end? Also please let me know which version of Octopus are you running.

Thanks!
Dalmiro