terra-farm / terraform-provider-virtualbox

VirtualBox provider for Terraform
https://terra-farm.github.io/provider-virtualbox/
MIT License
324 stars 136 forks source link

Physical network interfaces should be their own resources #64

Open ringods opened 5 years ago

ringods commented 5 years ago

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.