I am attempting to add availability zone into my VM arm template.
Majority of times I don't want the VM to be in a zone as it is a single VM.
So in my ARM template, I have defined the zone section as:
"zones":[
"[if(greaterOrEquals(parameters('availabilityZone'), 1),parameters('availabilityZone'),json('null'))]"
],
this works fine if I set a value of 1 or higher but fails if I leave as blank.
failed validation with message: 'The zone(s) '' for resource
'Microsoft.Compute/virtualMachines/XXX' is not supported.
if I remove the if
condition then hard code in the blank it works:
"zones": "",
I appreciate your help in advance.
Stu
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…