Currently, when creating a virtual machine (VM) with Terraform Provider for libvirt (terraform-libvirt-provider), only three types of consoles are allowed: pty, tcp, and dev. However, the official libvirt API supports a wider range of console types, such as file, udp, and others, which can be necessary and useful in multiple scenarios.
The lack of support for these types limits the ability to configure VMs effectively and prevents users from leveraging the full potential of libvirt when working with console settings. This can critically impact advanced use cases like flexible logging, debugging, network integration, and setup customization.
Steps to Reproduce:
In a Terraform configuration file, try to set up a console of type file or udp for a VM.
Specify the console parameters in the VM configuration block.
Execute terraform apply.
Expected Behavior:
The Terraform Provider should allow specifying console types such as file, udp, and all other types supported by libvirt. Appropriate documentation and validation for these types should also be provided within the provider.
Actual Behavior:
Currently, specifying any console type other than pty, tcp, or dev results in an error, as these options are not supported by terraform-libvirt-provider.
Issue Description:
Currently, when creating a virtual machine (VM) with Terraform Provider for libvirt (terraform-libvirt-provider), only three types of consoles are allowed: pty, tcp, and dev. However, the official libvirt API supports a wider range of console types, such as file, udp, and others, which can be necessary and useful in multiple scenarios.
The lack of support for these types limits the ability to configure VMs effectively and prevents users from leveraging the full potential of libvirt when working with console settings. This can critically impact advanced use cases like flexible logging, debugging, network integration, and setup customization.
Steps to Reproduce:
Expected Behavior:
The Terraform Provider should allow specifying console types such as file, udp, and all other types supported by libvirt. Appropriate documentation and validation for these types should also be provided within the provider.
Actual Behavior:
Currently, specifying any console type other than pty, tcp, or dev results in an error, as these options are not supported by terraform-libvirt-provider.
References to official libvirt documentation:
The official libvirt documentation highlights the availability of the following additional console types:
For example libvirt console type
file
(https://libvirt.org/formatdomain.html#consoles-serial-parallel-channel-devices)Proposed Improvement:
Additional Context:
Extending the range of valid console types would allow developers to configure VMs more flexibly, covering scenarios like: