Vsphere_virtual_machine->network_interface, connect option

Under the network interface section, I would like an option to allow for the interface to be present but not connected. I don’t see anything in the doc about doing this, although I suspect it would be a common config.

network_interface {
network_id = data.vsphere_network.kit.id
use_static_mac = “true”
mac_address = “00:50:56:00:${var.kit}:26”
adapter_type = “vmxnet3”


1 Like

without having ever used TF+vSphere … something does come to my mind …
go ahead and create the vm with TF, then toggle the network value from the GUI, then do a terraform plan and see which property has changed ?!
if its supported, it would show up in the plan.


no property changed. Vmware provider not track VM network adapter connected/start connected state. I think this is stupid. Also provider dont track power state of VM.
I created feature requests

But issue tracker of vmware provider seems orphaned …
I also try to realize my own propertyies of vm using dependent null resource with
provisioner “local-exec” govc to control vm, but i dont know how to start govc in triggers section to check the state of network adapter or power.

If I can borrow this thread since it is related to my question. Do you know if it is possible to provision vm without powering it on? I use Terraform v0.11.14 and provider.vsphere v1.13.0