我想在我的 vsphere terraform 计划中添加第二个网络,但我似乎不知道如何添加。我的 vsphere terraform 计划有以下内容:
network_interface {
label = "${var.network1}"
}
我希望能够添加第二个网络 (var.network2)。您知道如何实现吗?添加第二个标签似乎会覆盖第一个标签。
答案1
network_interface
您应该向您的资源中添加一个块vsphere_virtual_machine
:
resource "vsphere_virtual_machine" "vm" {
name = ""
folder = ""
vcpu = ""
memory = ""
datacenter = ""
cluster = ""
resource_pool = ""
network_interface {
label = "${var.network1}"
}
network_interface {
label = "${var.network2}"
}
disk {
datastore = ""
template = ""
}
}