0

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.

Bangi
  • 113
  • 6

1 Answers1

0

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
4c74356b41
  • 69,186
  • 6
  • 100
  • 141