簡體   English   中英

Azure 創建 ARM 模板以在現有 Vnet 和子網中創建 Vm

[英]Azure Create ARM Template To Create Vm In An Existing Vnet and Subnet

我想在現有的 vnet 和子網中部署 VM。 我可以不輸入 vnet 和子網名稱,而是獲取資源組中可用的 vnet 列表並將其設置為用戶可選,子網也是如此。

不,這是不可能的,例如,您需要使用 powershell 執行此操作,然后將其作為輸入傳遞給 ARM 模板。 它會是這樣的:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM