mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-06-30 10:33:46 +00:00
fix(vm): regression: vga.clipboard
attribute check (#1340)
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
This commit is contained in:
parent
b60ea9900f
commit
2785c40d44
@ -107,6 +107,10 @@ resource "proxmox_virtual_environment_vm" "example_template" {
|
||||
|
||||
serial_device {}
|
||||
|
||||
vga {
|
||||
type = "qxl"
|
||||
}
|
||||
|
||||
template = true
|
||||
|
||||
// use auto-generated vm_id
|
||||
|
@ -175,7 +175,8 @@ func TestAccResourceVM(t *testing.T) {
|
||||
}`),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
ResourceAttributes("proxmox_virtual_environment_vm.test_vm", map[string]string{
|
||||
"vga.0.type": "none",
|
||||
"vga.0.type": "none",
|
||||
"vga.0.clipboard": "",
|
||||
}),
|
||||
),
|
||||
}, {
|
||||
@ -195,6 +196,23 @@ func TestAccResourceVM(t *testing.T) {
|
||||
"vga.0.clipboard": "vnc",
|
||||
}),
|
||||
),
|
||||
}, {
|
||||
Config: te.RenderConfig(`
|
||||
resource "proxmox_virtual_environment_vm" "test_vm" {
|
||||
node_name = "{{.NodeName}}"
|
||||
started = false
|
||||
|
||||
vga {
|
||||
type = "virtio-gl"
|
||||
clipboard = ""
|
||||
}
|
||||
}`),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
ResourceAttributes("proxmox_virtual_environment_vm.test_vm", map[string]string{
|
||||
"vga.0.type": "virtio-gl",
|
||||
"vga.0.clipboard": "",
|
||||
}),
|
||||
),
|
||||
}},
|
||||
},
|
||||
}
|
||||
|
@ -66,6 +66,9 @@ func TestAccResourceVM2VGA(t *testing.T) {
|
||||
"vga.type": "std",
|
||||
"vga.memory": "16",
|
||||
}),
|
||||
test.NoResourceAttributesSet("proxmox_virtual_environment_vm2.test_vm", []string{
|
||||
"vga.clipboard",
|
||||
}),
|
||||
),
|
||||
},
|
||||
{ // now update the vga params and check if they are updated
|
||||
|
@ -1403,6 +1403,7 @@ func VM() *schema.Resource {
|
||||
Optional: true,
|
||||
Default: dvVGAClipboard,
|
||||
ValidateDiagFunc: validation.ToDiagFunc(validation.StringInSlice([]string{
|
||||
"",
|
||||
"vnc",
|
||||
}, true)),
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user