0
votes

I want to deploy VM in the existing vnet and subnet. Instead of entering vnet and subnet name, can I get the list of vnet available in a Resource Group and make it as a user-selectable, same for subnet.

1

1 Answers

0
votes

no, this is not possible, you need to do this with powershell, for example, and then pass that as an input to the ARM template. it would something like this:

$vnets = Get-AzVirtualNetwork
$vnet = $vnets | Out-GridView -PassThru
$subnet = $vnet.subnets | Out-GridView -PassThru
New-AzResourceGroupDeployment -param $subnet.id xxx