Physical network interfaces should be their own datasource and resource.
In case of a datasource, at plan and apply, the interface is looked up in the environment and when not there, it can be flagged.
In case of a resource, the network interface can be created first before it is used by a VM. Again, we have a clear dependency here.
The reason for me to create this issue is that I had a problem with the VMs being created from the example, because on my local Mac I did not have vboxnet1 created as a hostonly network interface. With the current implementation, I got half created VMs which did not recover in a second apply after manually creating the hostonly interface. I had to manually remove the VMs in Virtualbox before I could retry.
Physical network interfaces should be their own datasource and resource.
In case of a datasource, at
plan
andapply
, the interface is looked up in the environment and when not there, it can be flagged.In case of a resource, the network interface can be created first before it is used by a VM. Again, we have a clear dependency here.
The reason for me to create this issue is that I had a problem with the VMs being created from the example, because on my local Mac I did not have
vboxnet1
created as a hostonly network interface. With the current implementation, I got half created VMs which did not recover in a secondapply
after manually creating thehostonly
interface. I had to manually remove the VMs in Virtualbox before I could retry.