From a80f724e3ab30795205da67e2fbebd0b7c7d42c4 Mon Sep 17 00:00:00 2001 From: FrankT1983 Date: Mon, 26 Jun 2023 23:12:25 +0100 Subject: [PATCH] update multiple interfaces docs --- examples/vmware/README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/examples/vmware/README.md b/examples/vmware/README.md index 6a25387..2627f94 100644 --- a/examples/vmware/README.md +++ b/examples/vmware/README.md @@ -73,7 +73,8 @@ resource "vsphere_virtual_machine" "terraformVM" { memory = 2048 wait_for_guest_net_timeout = 0 guest_id = "debian10_64Guest" - nested_hv_enabled =true + nested_hv_enabled = true + network_interface { network_id = "${data.vsphere_network.mgmt_lan.id}" adapter_type = "vmxnet3" @@ -91,4 +92,17 @@ resource "vsphere_virtual_machine" "terraformVM" { path = "${resource.vsphere_file.install_iso.destination_file}" } } +``` + +## VMs with multiple network adapters +To use multiple network adapters, follow +[the official documentation](https://registry.terraform.io/providers/hashicorp/vsphere/1.17.0/docs/resources/virtual_machine) +and add the `use_static_mac` and `mac_address` properties to the individual network interfaces. + +```terraform + network_interface { + network_id = "${data.vsphere_network.mgmt_lan.id}" + use_static_mac = true + mac_address = "CA-8C-65-0D-E7-58" +} ``` \ No newline at end of file