From 821cf79a47dee1af559f5ed07d734e76a36219d0 Mon Sep 17 00:00:00 2001 From: Grant Gongaware Date: Tue, 10 Jul 2018 10:25:46 -0700 Subject: [PATCH] suppress diff on sensitive data when empty --- proxmox/resource_vm_qemu.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/proxmox/resource_vm_qemu.go b/proxmox/resource_vm_qemu.go index e46d8be..f3b0432 100644 --- a/proxmox/resource_vm_qemu.go +++ b/proxmox/resource_vm_qemu.go @@ -2,13 +2,14 @@ package proxmox import ( "fmt" - pxapi "github.com/Telmate/proxmox-api-go/proxmox" - "github.com/hashicorp/terraform/helper/schema" "log" "path" "strconv" "strings" "time" + + pxapi "github.com/Telmate/proxmox-api-go/proxmox" + "github.com/hashicorp/terraform/helper/schema" ) func resourceVmQemu() *schema.Resource { @@ -110,6 +111,9 @@ func resourceVmQemu() *schema.Resource { Optional: true, Sensitive: true, DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool { + if old == "" { + return true + } return strings.TrimSpace(old) == strings.TrimSpace(new) }, },