[ ] Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?
[ ] Make sure you explain why this option is important to you, why it should be important to everyone. Describe your use-case with detail and provide examples where possible.
[ ] If it is a very special case, consider using the XSLT support in the provider to tweak the definition instead of opening an issue
[ ] Maintainers do not have expertise in every libvirt setting, so please, describe the feature and how it is used. Link to the appropriate documentation
[ ] Is it a bug or something that does not work as expected? Please make sure you fill the version information below:
Currently I'm using the above main.tf and systems.tfvars file to create a bunch of vms on my system.
This works fine, but now we are trying to put the vms in different vlans.
I have Open vSwitch installed on my system, created a bridge, etc. I followed this tutorial https://www.redhat.com/sysadmin/libvirt-open-vswitch
The problem I have now is that I don't really understand how I can get my vms to connect to the correct vlan.
But I have no idea how to update my current configuration to get to this point.
I assume the best (only) way to get there is using the xml block, and passing a .xsl file to update the domain file. As assigning a VLAN can't be done in the network_interface block.
But then I look at the example file https://github.com/dmacvicar/terraform-provider-libvirt/blob/main/examples/v0.13/xslt/nicmodel.xsl and it seems that this would only be usable to update the domains to connect to the same VLAN ?
But I want the VLAN to be configurable. Anyone have an example for this? or am I looking in the wrong place?
System Information
Linux distribution
Oracle Linux 8.3
Terraform version
Terraform v1.4.4
Provider and libvirt versions
provider registry.terraform.io/dmacvicar/libvirt v0.7.1
Checklist
[ ] Is your issue/contribution related with enabling some setting/option exposed by libvirt that the plugin does not yet support, or requires changing/extending the provider terraform schema?
[ ] Is it a bug or something that does not work as expected? Please make sure you fill the version information below:
Description of Issue/Question
Setup
I use this in combination with a "systems.tfvars" file to create a bunch of vms on my system.
Description of Issue/Question
Currently I'm using the above main.tf and systems.tfvars file to create a bunch of vms on my system. This works fine, but now we are trying to put the vms in different vlans.
I have Open vSwitch installed on my system, created a bridge, etc. I followed this tutorial https://www.redhat.com/sysadmin/libvirt-open-vswitch The problem I have now is that I don't really understand how I can get my vms to connect to the correct vlan.
My understanding is that the domain XML should end up looking something like this. (Assuming this after reading https://libvirt.org/formatdomain.html#setting-vlan-tag-on-supported-network-types-only)
But I have no idea how to update my current configuration to get to this point. I assume the best (only) way to get there is using the
xml
block, and passing a .xsl file to update the domain file. As assigning a VLAN can't be done in thenetwork_interface
block. But then I look at the example file https://github.com/dmacvicar/terraform-provider-libvirt/blob/main/examples/v0.13/xslt/nicmodel.xsl and it seems that this would only be usable to update the domains to connect to the same VLAN ? But I want the VLAN to be configurable. Anyone have an example for this? or am I looking in the wrong place?