Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing "none" and "VirGL" to VGA type in proxmox_vm proxmox_virtual_environment_vm #1320

Closed
lfelicetti-softatnet opened this issue May 23, 2024 · 1 comment · Fixed by #1326
Labels
🐛 bug Something isn't working

Comments

@lfelicetti-softatnet
Copy link

lfelicetti-softatnet commented May 23, 2024

Describe the bug
Hello,
trying to create a new virtual machine with "none" or "virgl" as vga type, causes a validation problem.

Here is an example error:

Planning failed. Terraform encountered an error while generating this plan.


│ Error: expected type to be one of ["cirrus" "qxl" "qxl2" "qxl3" "qxl4" "serial0" "serial1" "serial2" "serial3" "std" "virtio" "vmware"], got none

│ with proxmox_virtual_environment_vm.ubuntu_vm,
│ on main.tf line 17, in resource "proxmox_virtual_environment_vm" "ubuntu_vm":
│ 17: type = var.vm_vga_type

To Reproduce
simply declare a vga type as "none" or "virgl".

terraform {
  required_providers {
    proxmox = {
      source = "bpg/proxmox"
      version = "0.55.1"
    }
  }
}

provider "proxmox" {
  endpoint = var.proxmox_endpoint_address
  username = var.proxmox_username
  password = var.proxmox_password
  insecure = var.proxmox_insecure
  tmp_dir  = var.proxmox_temp_dir
  ssh {
    username = var.proxmox_ssh_username
    password = var.proxmox_ssh_password
    agent = var.proxmox_use_ssh_agent
    node {
        name = var.proxmox_node_name        
        address = var.proxmox_node_ip_address
    }
  }
}

resource "proxmox_virtual_environment_vm" "ubuntu_vm" {
---SNIP---
  vga {
    type = "none" // or virgl
  }
---SNIP---
}

Expected behavior

Create the virtual machine

Additional context
Versions:

  • Terraform v1.6.3 on Linux amd64
  • bgp/proxmox v0.57.1
  • Proxmox 8.2

Thanks in advance,
Leonardo.

@bpg
Copy link
Owner

bpg commented May 26, 2024

There is a vga.enabled attribute, which, when set to false, is equivalent to type="none". However, I found it unreliable in my testing, so I marked it as deprecated and added none to the available types list.

@bpg bpg closed this as completed in #1326 May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants