ignore some white space on ssh private key

This commit is contained in:
Grant Gongaware 2017-03-06 15:44:46 -08:00
parent e8b2551eb9
commit 0a2ba9bf15

View File

@ -7,6 +7,7 @@ import (
"log" "log"
"path" "path"
"strconv" "strconv"
"strings"
"time" "time"
) )
@ -98,8 +99,10 @@ func resourceVmQemu() *schema.Resource {
"ssh_private_key": { "ssh_private_key": {
Type: schema.TypeString, Type: schema.TypeString,
Optional: true, Optional: true,
ForceNew: true,
Sensitive: true, Sensitive: true,
DiffSuppressFunc: func(k, old, new string, d *schema.ResourceData) bool {
return strings.TrimSpace(old) == strings.TrimSpace(new)
},
}, },
"force_create": { "force_create": {
Type: schema.TypeBool, Type: schema.TypeBool,