I have a requirement to provision a VM in azure based on selected parameter/variable value.
Consider, if user selected the variable value as 'yes' then VM should get provisioned with availability set. if user selected 'no' then VM should get provisioned without availability set.
May I know, how we can achieve this using single ARM Template?
Thanks in Advance! Regards, Narendran
Its quite easy, here is a sample of doing this:
"availabilitySet": "[if(equals(parameters('availabilitySet'),'yes'), variables('availabilitySet'), json('null'))]",
complete example here .
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.