我正在尝试在天蓝色上构建打包程序图像。如何为临时打包程序资源组(哪个打包程序临时创建和销毁(Vnet,vm))定义Vnet和VM IP范围以拍摄虚拟机快照?我想确保打包程序使用的默认IP不会与Azure订阅中现有的IP重叠
答案 0 :(得分:2)
您可以在打包程序模板内部指定选项,以使用现有资源组和虚拟网络。参见下面的示例
{
"builders": [{
"type": "azure-arm",
"client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx",
"client_secret": "ppppppp-pppp-pppp-pppp-ppppppppppp",
"tenant_id": "zzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz",
"subscription_id": "yyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyy",
// These will allow you to select existing resources
"build_resource_group_name": "my-existing-rg" // name of existing resource group
"virtual_network_name": "my-existing-vnet" // name of existing vnet
"virtual_network_subnet_name": "mySubnetName" // name of subnet inside vnet
"private_virtual_network_with_public_ip": true // apply public IP to VM (optional)
// Continue with rest of configuration
}