@ddelnano My goal is to have one DHCP (on my LAN) network and 0 or 1 private networks per VM.

The way I have my module setup currently I will just have one network created via Terraform. The main part I'm having trouble with is the second network being conditionally created with or without a MAC assigned.

If I use a dynamic block, all the network options will be configured for each network. There's really only two situations I want the module to work for.

a single network that has a MAC assigned one network with a MAC assigned and another network without a MAC assigned and on a different pool network.

Until I can figure out whether it's possible I just created a second module that uses two networks.

One idea I had was to use a a complex list(object) variable where each item in the list has a network name and a boolean that determines whether or not to assign a MAC from the pre-populated list but I could not get things going the right direction using the same variable for a terraform data object (used to get the ID associated with the named network) then also for the dynamic network block, having each network only assign a MAC conditionally.
If that was possible it would allow much more freedom to create whatever combination of network connections I wanted. If possible it would check for a specific network name that would always get a MAC assigned and another that never gets a MAC.

I am currently using the network name, from a list variable, to create a data object that provides the network ID for use in the xenorchestra_vm network block. I had trouble figuring out how to do that for two networks and be able to access the ID for each and get the MAC boolean conditionally applied to the network data object or objects.