Note that there is still a problem in the code that generates wrong DHCP ranges. I could only prove it comes from our generated XML, but I could not figure how the race happens. We will need to address that as a separate issue.
I believe we need to remove most of the network code, and be a thin layer on top of libvirt. It may require us to align our definitions, eg. no dhcp option in the network block, and a explicit range option.
This PR means to supersede/replace https://github.com/dmacvicar/terraform-provider-libvirt/pull/740
libvirt assigns the same bridge to networks defined in parallel (See https://gitlab.com/libvirt/libvirt/-/issues/78).
This code synchronizes network definition.
Note that there is still a problem in the code that generates wrong DHCP ranges. I could only prove it comes from our generated XML, but I could not figure how the race happens. We will need to address that as a separate issue. I believe we need to remove most of the network code, and be a thin layer on top of libvirt. It may require us to align our definitions, eg. no dhcp option in the network block, and a explicit range option.
Fixes https://github.com/dmacvicar/terraform-provider-libvirt/issues/703