From e3b7225362a4b4a3a960d58e99a83049f1b843ad Mon Sep 17 00:00:00 2001 From: Boik Date: Wed, 1 Feb 2023 16:40:29 +0800 Subject: [PATCH] Don't add extra hostpci entry When I try to clone from a template with no `hostpci` in the config, the post body would contain an extra `hostpci` because of these lines (from `DefaultFunc`). --- proxmoxtf/resource_virtual_environment_vm.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/proxmoxtf/resource_virtual_environment_vm.go b/proxmoxtf/resource_virtual_environment_vm.go index 693cfaf29..fd8566d31 100644 --- a/proxmoxtf/resource_virtual_environment_vm.go +++ b/proxmoxtf/resource_virtual_environment_vm.go @@ -839,17 +839,7 @@ func resourceVirtualEnvironmentVM() *schema.Resource { Optional: true, ForceNew: true, DefaultFunc: func() (interface{}, error) { - return []interface{}{ - map[string]interface{}{ - mkResourceVirtualEnvironmentVMHostPCIDevice: dvResourceVirtualEnvironmentVMHostPCIDevice, - mkResourceVirtualEnvironmentVMHostPCIDeviceID: dvResourceVirtualEnvironmentVMHostPCIDeviceID, - mkResourceVirtualEnvironmentVMHostPCIDeviceXVGA: dvResourceVirtualEnvironmentVMHostPCIDeviceXVGA, - mkResourceVirtualEnvironmentVMHostPCIDevicePCIE: dvResourceVirtualEnvironmentVMHostPCIDevicePCIE, - mkResourceVirtualEnvironmentVMHostPCIDeviceROMBAR: dvResourceVirtualEnvironmentVMHostPCIDeviceROMBAR, - mkResourceVirtualEnvironmentVMHostPCIDeviceROMFile: dvResourceVirtualEnvironmentVMHostPCIDeviceROMFile, - mkResourceVirtualEnvironmentVMHostPCIDeviceMDev: dvResourceVirtualEnvironmentVMHostPCIDeviceMDev, - }, - }, nil + return []interface{}{}, nil }, Elem: &schema.Resource{ Schema: map[string]*schema.Schema{