ARM Templates passing object parameter which contains bool

Hi,
I’ve come across an issue. I’ve adjusted my working arm template to have a object parameter which has a number of bool values in it. Example below. Every time, I run the template, it fails saying that it expected a bool but getting a string value. This is because octopus is placing a string value with a double quote around the value. So instead of true, it writes “true” which will get interpreted as a string. How can I get the octopus to pass the value as it is without quotes. I can’t believe I cannot specify in Octopus that the data type is a bool? Is everything passed as a String type?

“parameters”: {
“Require”:{
“value”: {
“NSG”: true,
“PIPaddress”: true,
“BootDiags”: true,
“LogAnalytics”: true,
“DSCScript”: true,
“CustomScript”: true
}
},

Thanks
Russell

Hey Russell,

Thanks for reaching out.

Here is some testing I have done on my end.

Original JSON:
image

Variable:

Step Setup:

Resulting File:
image

One thing to note, if you are using Structured Configuration Variables, Octopus will mimic whatever current variable type you have in that field when possible. If you have the original value enclosed in quotes, the substituted variable will end up in quotes as well.

Is there something in my reproduction that I am missing that may be causing the behavior for you?

Please let me know.

Best,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.