I'm trying to build out a script which deploys a vm into an availability set within an Azure availability zone.
However I keep getting the following error. I think (guessing) that it's to do with the fact the av set is not deployed to the same zone as the vm, but cannot find anywhere to set the zone on the availability set.
Error:
New-AzResourceGroupDeployment : 22:41:38 - Error: Code=InvalidRequestContent; Message=The request content was invalid and could not be deserialized: 'Could not find member 'zone' on
object of type 'TemplateResource'. Path 'properties.template.resources[3].zone', line 217, position 17.'.
At C:\ps\test-vm-build.ps1:182 char:7
+ New-AzResourceGroupDeployment -Name "SapTestDeploy" -ResourceGr ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-AzResourceGroupDeployment], Exception
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet
The ARM template has been uploaded to:
https://pastebin.com/embed_js/5Afn6Pip
Hoping someone has ome across this and can point me in the right direction, Thanks in advance :)