From 0a2ba9bf159f0dafa9a38067d91adb52fe6eff7a Mon Sep 17 00:00:00 2001 From: Grant Gongaware Date: Mon, 6 Mar 2017 15:44:46 -0800 Subject: [PATCH] ignore some white space on ssh private key --- proxmox/resource_vm_qemu.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proxmox/resource_vm_qemu.go b/proxmox/resource_vm_qemu.go index 6ec3735..298ed80 100644 --- a/proxmox/resource_vm_qemu.go +++ b/proxmox/resource_vm_qemu.go @@ -7,6 +7,7 @@ import ( "log" "path" "strconv" + "strings" "time" ) @@ -98,8 +99,10 @@ func resourceVmQemu() *schema.Resource { "ssh_private_key": { Type: schema.TypeString, Optional: true, - ForceNew: true, Sensitive: true, + DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + return strings.TrimSpace(old) == strings.TrimSpace(new) + }, }, "force_create": { Type: schema.TypeBool,